I have a data frame with 790 rows. I want to create a new data frame that excludes rows from 300 to 400 and leave the rest. I tried:
df.loc[[:300, 400:]]
df.iloc[[:300, 400:]]
df_new=df.drop(labels=range([300:400]),
axis=0)
This does not work. How can I achieve this goal?
Thanks in advance