Niharika wants to create a Pandas Series using a NumPy array with three elements 'a', 'b', and 'c', and assign custom indexes 'first', 'second' and 'third'. Help her complete the code below.
import pandas as pd
import ______ as np
arr = np._____ (['a' , 'b' , 'c'])
s = pd._____(arr,_____=['first','second','third'])
print(s)import numpy as np arr = np.array(['a', 'b', 'c']) s = pd.Series(arr, index=['first', 'second', 'third']) first a
second b
third c
dtype: object 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?