←back to thread

498 points azhenley | 1 comments | | HN request time: 0.199s | source
Show context
acdbddh ◴[] No.45772097[source]
In python its common to see code like this:

  df = pd.concat(df,other_df)
  df = df.select(...)
  ...
My eyes hurts, when I see it. It makes me avoid python. I bet the reason for this mutable code is a missing simple pipes syntax. I love pipes. In R can do:

  df |> 
    rbind(other_df) |> 
    select(...)
It feels much better.
replies(5): >>45772142 #>>45772222 #>>45772564 #>>45772704 #>>45776281 #
1. cubefox ◴[] No.45772564[source]
Wouldn't that be simply:

  df = pd.concat(df,other_df).select(...)