Skip to content

TypeError for tab.fetch_data(headers=True) #21

Description

@tgig

Hi there,

Thanks for the great library. I'm having an issue pulling tab data for a column with a header which is formatted as Date. The data looks like this:

day col1 col2
9/5/1976 1.23 2.34
12/3/1978 3.45 4.56
1/16/2020 5.67 6.78

The entire day column is formatted as Date. When I use the following command, I get the following error:

df = tab.fetch_data(headers=True)

TypeError: Mismatch exists in expected and actual data types for cell with value 'day'. Cell format is 'DATE' but cell value type is '<class 'str'>'. To correct this, in Google Sheets set the appropriate cell format or set it to Automatic

If I change the cell A1 to be a string, the dataframe loads, but the dtype is Object.

I would expect the headers=True flag to ignore the format of the value in the first row. Am I missing something?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions