Skip to content

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

@koperagen

Description

@koperagen

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions