Parallelising loops using ray Core

Hi, I have a Linear Solver algorithm that sets constraints and solves it. My use case is that, I have ~3000 rows (call it as a group) and 18 years (time series). I take a particular year and then for that year, I solve for the 3000 groups. So I have something like,

for year in self.year_list:
  df_filtered= grouped_df[grouped_df['year'] == year].reset_index(0, drop=True)
  group_list = list(df_filtered['group'].unique())
  for group in group_list:
     df_solution, df_impossible = solve(df_filtered, group, year)

I’m new to Ray and I’d like to know if I can use Ray to parallelise this process. Thanks in advance

You can either try ray.data or just mark the solve function remote.