Skip to content

Add option to decode zone_id mappings sharrow adds for columns with NA values #1080

Description

@dhensle

Is your feature request related to a problem? Please describe.
When running with sharrow there is a zone mapping that is applied to turn zone ids into a 0-indexed mapping. At the end of sharrow runs, zone ids are then decoded back to the actual zone ids.

There are cases where a column in an output trip table containing zone ids (e.g. pnr_zone_id) might be -1 or NA. In sharrow, we want to still decode the values that are not -1 (already implemented) or NA (missing).

When decoding a column with NA in there, you get the following error at the end of the model run: pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer

Describe the solution you'd like
Add a nullable_nonnegative decode option instead of just a nonnegative option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions