I have-
data=pd.read_csv('data.csv')
if data.empty==False:
do something
In my code the dataframe data generated sometimes is empty depending on some conditions. Now when the csv file is empty its throwing error-
EmptyDataError: No columns to parse from file
what should I do to avoid this error?