an example of bolean index in data frame
Answers
Answered by
2
Answer:
This example shows the working of how to access the DataFrame with a boolean index:
- # importing pandas as pd.
- import pandas as pd.
- # dictionary of lists.
- dict = {'name':["Smith", "William", "Phill", "Parker"],
- 'age': ["28", "39", "34", "36"]}
- info = pd. DataFrame(dict, index = [True, True, False, True])
- print(info
Similar questions