jorisvandenbossche opened a new pull request, #44963:
URL: https://github.com/apache/arrow/pull/44963

   ### Rationale for this change
   
   Small part of https://github.com/apache/arrow/pull/44195 factored out into 
its own PR because this change is just a small refactor making 
https://github.com/apache/arrow/pull/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.
   
   ### Are these changes tested?
   
   Existing tests should cover this
   
   ### Are there any user-facing changes?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to