Answers for "drop specific values from pandas dataframe"

8

python: remove specific values in a dataframe

df.drop(df.index[df['myvar'] == 'specific_name'], inplace = True)
Posted by: Guest on June-22-2020
0

drop rows with certain values pandas

#to drop rows based on certain condition in a column
import pandas as pd

df = df[df['column']!=1]
Posted by: Guest on January-04-2022

Code answers related to "drop specific values from pandas dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language