-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change filename column name to file_name #449
Change filename column name to file_name #449
Conversation
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
@@ -64,7 +64,7 @@ def read_json( | |||
input_files: The path of the input file(s). | |||
backend: The backend to use for reading the data. | |||
files_per_partition: The number of files to read per partition. | |||
add_filename: Whether to add a "filename" column to the DataFrame. | |||
add_filename: Whether to add a "file_name" column to the DataFrame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about changing add_filename
to add_file_name
, keep_filename_column
to keep_file_name_column
, write_to_filename
to write_to_file_name
, etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah I did think about it but I personally felt the cons of renaming arguments in function signature >> pros of having alignment between the actual column name, specifically where backward compatibility, changing across scripts / tutorials / user behavior.
If you think the that the consistency between functions argument name and the df
column name matters, I'll be happy to change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay yeah, I don't have a very strong preference for it so feel free to keep as is, unless others have different opinions.
In this case, my only other comment is if you could make sure there aren't any lingering scripts or examples/tutorials that try to access a "filename" column when it should now be "file_name"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a quick look and couldn't find anything, found one remaining comment line that I've added 1126461
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing it. I think file_name
is innocuous enough for the benefit we are getting.
Signed-off-by: Praateek <[email protected]>
Description
Resolves #427
Usage
# Add snippet demonstrating usage
Checklist