|
|
|
|
|
by hervature
1618 days ago
|
|
Taking the first two rows is a mess in pandas? flights.groupby("month").head(2) Not only is does this have all the same keywords, but it is organized in a much clearer way to newcomers and labels things to look up in the API. Whereas your R code has a leading comma, .SD, and a mix of quotes and non-quotes for references to columns. You even admit the last was confusing to learn. This can all be crammed in your head, but not what I would call thoughtfully designed. |
|
When exploring data, I wouldn't need or use any whitespace. How would your Pandas approach look like?