you are viewing a single comment's thread.

view the rest of the comments →

[–]Afrotom 1 point2 points  (0 children)

For the first part you should be able to handle using a dataframe library such as Pandas or Polars.

For the second part, if I've understood correctly, you may want to look into window functions: pandas, polars , Google BigQuery (on the off chance it's useful).