You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 1, 2020. It is now read-only.
The DataFrame returned by the client has fips represented as an int64 but my understanding is they are better represented as 2 or 5 character strings. A quick fix that seems to work for me is df.fips = df.fips.apply(lambda v: f"{v:0>{2 if v < 100 else 5}}")
The text was updated successfully, but these errors were encountered:
I'm not particularly opinionated on this -- I believe we chose to use integers so
We could do comparisons like fips < 100 => states or (fips > 6000) and (fips < 7000) => all CA counties (There could be other ways to do this as well though)
Unless we have a more compelling reason than (1) or (2), I'm not opposed to just changing them at the database level which would make this change happen globally.
@TomGoBravo would it be helpful if we had a keyword arg on the client that is something like fips_as_str that would apply that transformation to the fips column on each request before returning the data frame?
This is no big deal either way to me, just bringing up something I noticed.
In code I work on I'm trying to stick to an opaque string to identify a region and factor out logic that relates the regions to each other without depending on the structure of the region identifier.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
DataFrame
returned by the client has fips represented as an int64 but my understanding is they are better represented as 2 or 5 character strings. A quick fix that seems to work for me isdf.fips = df.fips.apply(lambda v: f"{v:0>{2 if v < 100 else 5}}")
The text was updated successfully, but these errors were encountered: