I have a dataframe with 85 columns and something like 10.000 rows.
The first column is Shrt_Desc
and the last Refuse_Pct
The new data frame that I want has to have Shrt_Desc
, then leave some columns out and then include in series Fiber_TD_(g)
to Refuse_Pct
I use:
dfi_3 = food_info.loc[:, ['Shrt_Desc', 'Fiber_TD_(g)':'Refuse_Pct']]
but it gives a syntax error.
Any ideas how can I achieve this?
Thank you.