I wanted to create a new dataframe on pandas based on conditions of the current dataframe. If the current dataframe is > 1000 rows then make the data frame empty (delete rows). Otherwise then just use the current dataframe. Below is my code that is having an error:
DF_NEW = np.where(len(DF)>1000, pd.DataFrame(DF[0:0]), pd.DataFrame(DF))