Informatics Practices
Which of the following can be used to specify the data while creating a dataframe?
- Series
- List of Dictionaries
- Structured ndarray
- All of these
Python Data Handling
1 Like
Answer
All of these
Reason — We can create a DataFrame object by passing data in many different ways, such as two-dimensional dictionaries (i.e., dictionaries having lists or dictionaries or ndarrays or series objects etc), two-dimensional ndarrays, series type object and another DataFrame object.
Answered By
1 Like
Related Questions
Which attribute of dataframe is used to get number of axes?
- T
- Ndim
- Empty
- Shape
CSV stands for :
- Column Separated Value
- Class Separated Value
- Comma Separated Value
- None of the above
Which of the following commands shows the information with city="Delhi" from dataframe SHOP?
- print(SHOP[City == 'Delhi'])
- print(SHOP[SHOP.City == 'Delhi])
- print(SHOP[SHOP.'City' == 'Delhi'])
- print(SHOP[SHOP[City] == 'Delhi'])
The following statement will …………… .
df = df.drop(['Name', 'Class', 'Rollno'], axis = 1) #df is a DataFrame object- delete three columns having labels 'Name', 'Class' and `Rollno'
- delete three rows having labels 'Name', 'Class' and 'Rollno'
- delete any three columns
- return error