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
Small part of #44195 factored out into its own PR because this change is just a small refactor making #44195 easier to do, but in itself not changing any logic.
We currently both store name and field_name in the pandas metadata. field_name is guaranteed to be a string, and is always exactly the name used in the arrow schema. name can also be None if the original pandas DataFrame used None as the column label or if it was coming from an index level without name.
Right now we had several places where we used name but then checked for it being None. We can make it more consistently use field_name in the cases it needs the string version.
The text was updated successfully, but these errors were encountered:
…at (#44963)
### Rationale for this change
Small part of #44195 factored out into its own PR because this change is just a small refactor making #44195 easier to do, but in itself not changing any logic.
We currently both store `name` and `field_name` in the pandas metadata. `field_name` is guaranteed to be a string, and is always exactly the name used in the arrow schema. `name` can also be None if the original pandas DataFrame used None as the column label or if it was coming from an index level without name.
Right now we had several places where we used `name` but then checked for it being None. With this PR I made it more consistently use `field_name` in the cases it needs the string version, by more consistently passing through both names a field_names.
### Are these changes tested?
Existing tests should cover this
### Are there any user-facing changes?
No
* Issue: #44962
* GitHub Issue: #44962
Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
Small part of #44195 factored out into its own PR because this change is just a small refactor making #44195 easier to do, but in itself not changing any logic.
We currently both store
name
andfield_name
in the pandas metadata.field_name
is guaranteed to be a string, and is always exactly the name used in the arrow schema.name
can also be None if the original pandas DataFrame used None as the column label or if it was coming from an index level without name.Right now we had several places where we used
name
but then checked for it being None. We can make it more consistently usefield_name
in the cases it needs the string version.The text was updated successfully, but these errors were encountered: