Informatics Practices
Which of the following Python statements can be used to select a column column_name from a DataFrame df ?
- df.getcolumn('column_name')
- df['column_name']
- df.select('column_name')
- df(column_name)
Python Pandas
4 Likes
Answer
df['column_name']
Reason — The statement df['column_name'] is used to select a column named column_name from a DataFrame df in Python.
Answered By
1 Like
Related Questions
Identify the SQL command used to delete a relation (table) from a relational database.
- DROP TABLE
- REMOVE TABLE
- DELETE TABLE
- ERASE TABLE
e-waste refers to:
- Software that has become obsolete
- Data that has been deleted from a storage device
- Viruses that infect computers
- Electronic devices that are no longer in use
By default, the plot() function of Matplotlib draws a …………… plot.
- histogram
- column
- bar
- line
State whether the following statement is True or False:
In SQL, the HAVING clause is used to apply filter on groups formed by the GROUP BY clause.