Skip to content
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

Define rename and rename! for modifying column names? #57

Open
junyuan-chen opened this issue Nov 8, 2022 · 3 comments
Open

Define rename and rename! for modifying column names? #57

junyuan-chen opened this issue Nov 8, 2022 · 3 comments

Comments

@junyuan-chen
Copy link

I thought it would be useful to define rename and rename! in DataAPI.jl for functions that achieve purposes similar to what they do for DataFrames.jl.

@junyuan-chen junyuan-chen changed the title Define rename and rename! for modifying column name? Define rename and rename! for modifying column names? Nov 8, 2022
@bkamins
Copy link
Member

bkamins commented Nov 8, 2022

What other package wants to use these names?
Note that DataAPI.jl in general just defines function names, mostly without providing implementations.
The purpose of this package is to avoid function name clashes. Maybe you also want to propose adding these to https://github.com/JuliaData/TableOperations.jl?

@junyuan-chen
Copy link
Author

junyuan-chen commented Nov 8, 2022

I am considering having such functions for ReadStatTables.jl. At this moment, renaming column names is not immediately needed. However, with future implementation of writing support for the Stata/SAS/SPSS data files, modifying column names in-place should be useful. For example, one may load data from a file and rename the columns before saving them somewhere else. Directly changing the column names avoid the need of moving metadata carried with the columns around for a simple task like this.

I just realized that there was some discussion here.

@bkamins
Copy link
Member

bkamins commented Nov 8, 2022

OK - if you want to add them in ReadStatTables.jl then it makes sense to add them to DataAPI.jl.

@nalimilan - do you see any issues with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants