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