Pandas Core Object
Which object is most similar to a one-dimensional NumPy array but allows indexing of values using labels?
- DataFrame
- Scalar
- Series
- Array
- DaFrame
DataFrame Data Types
Within a column of a DataFrame, which of the following statements about data types is most accurate?
- Data types can vary within a column.
- Data types must be strings.
- Data types can be different, but numerical values must all be integers.
- Everything must be the same data type.
- Data types are automatically converted to the most common type.
NumPy Dependency
Which of the following libraries does Pandas rely on for its foundational numerical operations?
- SciPy
- Matplotlib
- NumPy
- SQL
- Numpy
ndarray Dimensions
Which of the following is most correct regarding NumPy arrays, also known as ndarrays?
- They can only be one-dimensional.
- They can only be two-dimensional.
- They can have any number of dimensions.
- They must be square matrices.
- They are always the same dimensions.
Creating NumPy Arrays
How would you create a one-dimensional NumPy array from a Python list called 'my_list'?
- array(my_list)
- np.List(my_list)
- np.ndarray(my_list)
- np.array(my_list)
- np.arry(my_list)
Numerical Operations on Arrays
When is it most advantageous to use NumPy arrays over Python lists for mathematical operations?
- When the data is small.
- When the data contains mixed data types.
- When the data needs to be processed quickly.
- When the data requires complex looping logic.
- When the data needs to be printed.
Series Construction
Which data type cannot be used as an argument for creating a Pandas Series object?
- Scalar Value
- Python List
- Dictionary
- NumPy Array
- DataFrame
DataFrame from Lists
When creating a DataFrame from a Python list of lists, what does each nested list typically represent?
- A column in the DataFrame.
- A cell in the DataFrame.
- A single value in the DataFrame.
- A row in the DataFrame.
- A header in the DataFrame.
Setting DataFrame Index
What is the command to use a column named 'identifier' as the index of a DataFrame named 'data'?
- data.set_index('index')
- data.index = 'identifier'
- data.set_column_index('identifier')
- data.set_index('identifier')
- data.use_index('identifier')
Array seed
What does the term numpy.random.seed() do?
- Clears the numbers in the array
- This makes the numbers appear unique
- Creates unique sets of numbers
- Aligns the numbers with a seed
- The seed clears the array