by acdbddh · 1y ago · 0 comments
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.Typically you align a pipeline like so:
df
|> rbind(other_df)
|> select(...)
But these topics are largely left to code formatters these days. df = pd.concat(df,other_df).select(...)- https://github.com/elixir-explorer/explorer - https://hexdocs.pm/explorer/Explorer.html