Answers for "dropping rows in pandas"

8

drop columns pandas

df.drop(columns=['B', 'C'])
Posted by: Guest on March-23-2020
5

df drop column

df = df.drop(['B', 'C'], axis=1)
Posted by: Guest on June-02-2020
1

delete rows in pandas

# importing pandas module
import pandas as pd
  
# making data frame from csv file
data = pd.read_csv("nba.csv", index_col ="Name" )
  
# dropping passed values
data.drop(["Avery Bradley", "John Holland", "R.J. Hunter",
                            "R.J. Hunter"], inplace = True)
  
# display
data
Posted by: Guest on September-22-2021
0

remove rows from dataframe

df.drop(['Cochice', 'Pima'])
Posted by: Guest on August-23-2020

Code answers related to "dropping rows in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language