Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Dec 1, 2025

Follow-up on #62040

See #62040 (comment) for some arguments why I think it fits better, but in general: if this option is for migrating to a future change in behaviour (and not to be kept as a choosable mode long term), then a future option fits better.

Regarding naming, I would really like to keep the pattern of "enabling" future options by setting them to True. But because of that, future.nan_is_na would not work. Took future.distinguish_nan_and_na, but that is quite long, so if someone has a better idea, all ears.

@jorisvandenbossche jorisvandenbossche added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate API Design NA - MaskedArrays Related to pd.NA and nullable extension arrays labels Dec 1, 2025
@jorisvandenbossche jorisvandenbossche added this to the 3.0 milestone Dec 1, 2025
@Dr-Irv
Copy link
Contributor

Dr-Irv commented Dec 1, 2025

I'm fine with this name change.

cf.register_option(
"distinguish_nan_and_na",
os.environ.get("PANDAS_FUTURE_DISTINGUISH_NAN_AND_NA", "0") == "1",
"Whether to treat NaN entries as interchangeable with pd.NA in "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description here seems to suggest that "True" means interchangeable, which is misleading

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than this, LGTM pending green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Design Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate NA - MaskedArrays Related to pd.NA and nullable extension arrays

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants