When I am giving loc[:,1:14] it throws an error
"TypeError: cannot do slice indexing on <class 'pandas.core.indexes.base.Index'> with these indexers  of <class 'int'>"
But loc[:,[1,2,3]] is working.
Can you please help me with it?
A general rule to remember is the number of squared brackets on each side should match the number of dimensions the object has. Hence, if it’s just a vector of data (like an array that is part of a series), you can use [ : ], but if it’ more like a matrix (2-D), then you need double squared brackets [[ : ]].
Thank you for your answer. But I have used the same command used in the tutorial for the same scenario. Command used in tutorial : reason_columns.loc[:, 1:14]. Command I used: reason_column.loc[:, 1:14] where reason_column and reason_columns both are dummy variables (2-D matrix).