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

rename(Pair<String, String>) assigns new names in the wrong order #1067

Closed
koperagen opened this issue Feb 18, 2025 · 0 comments · Fixed by #1104
Closed

rename(Pair<String, String>) assigns new names in the wrong order #1067

koperagen opened this issue Feb 18, 2025 · 0 comments · Fixed by #1104
Assignees
Labels
bug Something isn't working

Comments

@koperagen
Copy link
Collaborator

Given:

val df = listOf(
  Triple(1, 10, 0.1),
  Triple(2, 20, 0.2)
).toDataFrame()
  .rename("first" to "id", "second" to "df_count", "third" to "df_ratio")

This

df.rename(
  "df_ratio" to "ratio_df",
  "df_count" to "count_df"
)

Should be id, count_df, ratio_df, but now is id, ratio_df, count_df, so columns are assigned a new name in the order they occur in the dataframe

@koperagen koperagen added the bug Something isn't working label Feb 18, 2025
@koperagen koperagen added this to the 0.16 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants