Skip to content

in geo.filtered_fips: TypeError: unhashable type: 'Series' #238

@bl-young

Description

@bl-young

Obtaining the national FIPS code in geo.filtered_fips returns a TypeError

flowsa/flowsa/geo.py

Lines 89 to 90 in a45e737

if geoscale == 'national' or geoscale == scale.NATIONAL:
return (get_all_fips(year).query('State.isnull()'))

See for example this example code, fails on the third attempt.

import flowsa.geo as geo

geo.get_all_fips(2015).query('State != State') # option 1 see https://stackoverflow.com/a/46021212
geo.get_all_fips(2015).query('State.isnull()', engine='python') # option 2
geo.get_all_fips(2015).query('State.isnull()') # current method fails

I'm using pandas 1.3.3 and its possible this bug may be fixed in pandas 1.4. See this comment.

We either need to require pandas 1.4 or implment one of the options above

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature branchIssues related to feature branches not impacting master

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions