Introduction to pandas and Data Manipulation

video link
In this video at the end, discussed list used for selecting or indexing multiple columns, there if we use tuples:
the syntax will be like this
so we can convert series into column
if I’m wrong please let me know.
Thank you

1 Like

Sorry I didn’t get what you actually meant.But this way of column selection helps to select specific columns mentioned so you can mention those either in list or in tuple format.But if I’m considering that you want to specify a range of columns then you can try it as following:-
df.loc[:,‘START’:‘END’+1](since the 1st value is inclusive & the last is exclusive so you’re supposed to select the one next to your required so you get every column of interest.There’s one more command as well which is the iloc wherein you specify numeric values of column & syntax is df.iloc[:,0:n-1].Hope that helps!!