Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas and operator

# Loads dataset
df = pd.read_csv('dataset.csv')

# Filter data using & instead of and
filtered_df = df.loc[(df['column1'] == var1) & (df['column2'] == var2)]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #operator
ADD COMMENT
Topic
Name
2+8 =