Write a Python program to create and display a Pandas Series as shown below:
| July | 31 |
|---|---|
| Aug | 31 |
| Sept | 30 |
| Oct | 31 |
The index labels are the names of the months – July, Aug, Sept, Oct.
The corresponding scalar values are the number of days in these respective months – 31, 31, 30, 31.
import pandas as pd
S = pd.Series([31, 31, 30, 31], index=['July', 'Aug', 'Sept', 'Oct'])
print(S) July 31
Aug 31
Sept 30
Oct 31
dtype: int64 State whether the following statement is True or False:
In Pandas Series, the Positional index can be a string or an integer.
We can add a new row to a DataFrame DF using the ______ method.
Naveen discarded various types of waste material without realizing that e-waste contains harmful substances that could pollute the environment. He wants to know which of the following will be considered as e-waste?
In which scenario is a bar chart preferred over a line chart?
Which of the following network topology uses a central cable (backbone) to connect all devices?
State whether the following statement is True or False:
In Pandas Series, the Positional index can be a string or an integer.
We can add a new row to a DataFrame DF using the ______ method.
Aditya is working on a DataFrame named df. He has written the statement:
print(df.loc['S2'])What will the above statement do?
In the context of creating a Pandas Series from a dictionary, which of the following statement is correct?
In Pandas, when extracting a portion of a Series ser1 using ser1[start:end] with positional indices start and end, which of the following statements is true?