Skip to content

KeyError: 'clicks' #10

Description

@alisaghafiwork

Hey I keep getting this error :
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/harry-d-luffy/Desktop/python/google search console api/GoogleSearchConsole-Tutorial/run_gsc.py", line 49, in
gsc_to_csv(*args)
File "/home/harry-d-luffy/Desktop/python/google search console api/GoogleSearchConsole-Tutorial/gsc_to_csv_by_month.py", line 113, in gsc_to_csv
df['clicks'] = df['clicks'].astype('int')
File "/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py", line 3024, in getitem
indexer = self.columns.get_loc(key)
File "/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'clicks'

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions