Briefly explain the purpose of Boolean Indexing with respect to DataFrames. Support your answer with a suitable example.
import pandas as pd
df = pd.DataFrame({'Item': ['Pen', 'Book', 'Bag'], 'Price': [10, 150, 400]})
print(df[df['Price'] >= 150])The test df['Price'] >= 150 gives False, True, True for the three rows. 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?