Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How to delete a column or group of columns in pandas? Given the below dataframe drop column “col1”.
Home
Python
How to delete a column or group of columns in pandas? Given the below dataframe drop column...
+1
vote
asked
Feb 14, 2021
in
Python
by
SakshiSharma
How to delete a column or group of columns in pandas? Given the below dataframe drop column “col1”.
#delete-column
pandas-delete-column
dataframe
dataframe-column
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Feb 14, 2021
by
SakshiSharma
drop() function
can be used to delete the columns from a
dataframe
.
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: How to fetch a data entry from a pandas dataframe using a given value in index?
asked
Feb 11, 2021
in
Python
by
SakshiSharma
#python-dataframe
dataframe
dataframe-fetch
python
Python-questions-answers
+1
vote
Q: Given the following data frame drop rows having column values as A.
asked
Feb 14, 2021
in
Python
by
SakshiSharma
#python-data-fame
dataframe
python
Python-questions-answers
+1
vote
Q: Given the below dataframes form a single dataframe by vertical stacking.
asked
Feb 15, 2021
in
Python
by
SakshiSharma
#python-dataframe
dataframe
single-dataframe
Python-questions-answers
+1
vote
Q: You are given a dataframe with prices of cheeses. However, the dataframe is missing values in the price column. Write a function to impute the median price in place of missing values.
asked
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframe
datasets
+1
vote
Q: Given a dataframe of students’ favorite colors and test scores, write a function to select only those rows (students) where their favorite color is green or red and their test grade is above 90.
asked
Oct 28, 2022
in
Python
by
SakshiSharma
python
dataframe
datasets
0
votes
Q: How to create dataframe from a dictionary?
asked
Feb 10, 2021
in
Python
by
SakshiSharma
#dataframe-dictionary
dataframe
pandas
python
Python-questions-answers
0
votes
Q: How to create a dataframe from lists?
asked
Feb 10, 2021
in
Python
by
SakshiSharma
#create-dataframe
pandas-dataframe
dataframe
python
Python-questions-answers
0
votes
Q: How to merge dataframes in pandas?
asked
Feb 10, 2021
in
Python
by
SakshiSharma
#dataframe-merge
dataframe
python-dataframe
python
Python-questions-answers
0
votes
Q: What is the difference between a series and a dataframe in Pandas?
asked
Oct 27, 2022
in
Python
by
SakshiSharma
dataframe
pandas
0
votes
Q: What kind of joins does pandas offer?
asked
Feb 10, 2021
in
Python
by
SakshiSharma
#pandas-dataframe
dataframe
python
Python-questions-answers
...