Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: list indices must be integers, not Index" when using Google Analytics IO #8779

Closed
msure opened this issue Nov 10, 2014 · 3 comments
Labels
Duplicate Report Duplicate issue or pull request

Comments

@msure
Copy link

msure commented Nov 10, 2014

I recently upgraded from pandas 14.1 to 15.0 and now I am having trouble with the Google Analytics IO tool. Even when running simple queries like:

ga_data = ga.read_ga(metrics='sessions',
    dimensions='date',
    start_date='2014-06-06',
    end_date='2014-10-25',
    filters='sourceMedium==google / organic',
    account_id='123456789') #obscured account id of course

I get the error "TypeError: list indices must be integers, not Index", whereas I use to get back ga_data as a (iirc) Series object with the dates as the index.

Some context: I use Anaconda from Continuum Analytics. My upgrade process was:

  1. conda update conda
  2. conda update anaconda
  3. conda update pandas
    The latter also upgraded numpy and one other package (I don't recall the other packages).

Sorry, but I do not have any pull requests to fix (still really new to this). Please let me know if there's anything else I can provide (e.g. the stack trace).

Thanks!

@jreback
Copy link
Contributor

jreback commented Nov 10, 2014

GA has not gotten much care and feeding in quite a while. Biggest problem is it doesn't have really any automatic tests. So if you'd like to debug, pls provide a full-traceback (and debug so that you can show what the various variables are).

@jreback
Copy link
Contributor

jreback commented Nov 10, 2014

dupe of #8773

@jreback jreback closed this as completed Nov 10, 2014
@jreback jreback added the Duplicate Report Duplicate issue or pull request label Nov 10, 2014
@jreback
Copy link
Contributor

jreback commented Nov 11, 2014

http://stackoverflow.com/questions/26858077/pandas-io-ga-not-working-for-me-solved

looks like passing index_col=0 will solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants