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
Fix pandas 3.0 KeyError in Enum.encode() for Series with non-integer index
In pandas 3.0, string columns use StringDtype by default. When a Series
has a string index, array[0] does label-based lookup (looking for key "0")
instead of positional access, causing KeyError.
The fix uses .iloc[0] for pandas Series to ensure positional access.
Fixes#427
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed pandas 3.0 compatibility in Enum.encode() by using positional access (.iloc[0]) for pandas Series instead of label-based access (array[0]), which fails with KeyError when Series has a non-integer index (fixes #427)
You requested computation of variable "{}", but you did not specify on which period in "{}:{}":
83
84
{}
84
85
When you request the computation of a variable within a formula, you must always specify the period as the second parameter. The convention is to call this parameter "period". For example:
85
86
computed_salary = person('salary', period).
86
87
See more information at <https://openfisca.org/doc/coding-the-legislation/35_periods.html#periods-in-variable-definition>.
0 commit comments