Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python if dataframe has at least one row

filtered_df = my_df.loc[my_df['ColA'] == myvalue] #calculated df

if len(filtered_df.index) > 0: # if the df has at least one row
	# your code here
 
PREVIOUS NEXT
Tagged: #python #dataframe #row
ADD COMMENT
Topic
Name
8+8 =