PUDL pandas style guide #3792
bendnorman
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
hey ben! i think this is a good idea overall! I'm curious if there are any resources that we can just point to instead of making these decisions ourselves. On a quick search I found this one which is relatively minimal but I like it overall. (of your examples though, it does seem to only answer your Also, we did a million years ago take a first crack at an attempt to develop some code standards. This does have a small pandas section but it was never really fleshed out. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any interest in developing a Catalyst/PUDL pandas style guide? My return to data wrangling with the gridstatus work reminded me how many ways there are to do an operation in pandas. Some examples:
+
vs.add()
df.query("a = 1")
,df[df.a == 1]
,df[df.a.eq(1)]
df["my_column"]
,df.my_column
I think we all have different styles right now which sometimes makes it challenging to learn about a new section of data wrangling code.
If we wanted to go wild we could even create a pre-commit linter.
Beta Was this translation helpful? Give feedback.
All reactions