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 Pandas
2 Likes
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
3 Likes
Related Questions
If a DataFrame is created using a 2D dictionary, then the indexes/row labels are formed from …………… .
- dictionary's values
- inner dictionary's keys
- outer dictionary's keys
- none of these
If a dataframe is created using a 2D dictionary, then the column labels are formed from …………… .
- dictionary's values
- inner dictionary's keys
- outer dictionary's keys
- none of these
The axis 0 identifies a DataFrame's …………… .
- rows
- columns
- values
- datatype
The axis 1 identifies a DataFrame's …………… .
- rows
- columns
- values
- datatype