I have a lot of different table (and other unstructured data in an excel sheet) .. I need to create a dataframe out of range \'A3:D20\' from \'Sheet2\' of Excel sheet \'data
Use the following arguments from pandas read_excel documentation:
- skiprows : list-like
- Rows to skip at the beginning (0-indexed)
- parse_cols : int or list, default None
- If None then parse all columns,
- If int then indicates last column to be parsed
- If list of ints then indicates list of column numbers to be parsed
- If string then indicates comma separated list of column names and column ranges (e.g. “A:E” or “A,C,E:F”)
I imagine the call will look like:
df = read_excel(filename, 'Sheet2', skiprows = 2, parse_cols = 'A:D')