I am trying to read every kth column of an Excel file using pandas.read_excel. From the documentation usecols option with a callable seems useful:
If callable, then evaluate each column name against it and parse the column if the callable returns True.
Is there a way for the callable to take in the column number rather than column name? Something like:
pd.read_excel('file.xls', usecols=lambda col_number: not col_number % k)