python - How to select n-1 column in a dataframe -
we need select n-l column n column in dataframe using python have tried method
sample code
x = dataframe1[['col1,col2......n']] is there other way around
if have pandas dataframe df column names ['col1', 'col2', ...] can like:
df.ix[:,'col2':] # select col2, col3, ... or
df.ix[:,:'col4'] # select col1, col2, col3 , col4
Comments
Post a Comment