How to convert polars series to pandas series in python?
My current workaround is:
df = pl.DataFrame({"a":[1,1,2], "b":[2,2,3], "c":[1,2,3]})
df[["a"]].to_pandas()["a"]
But is there a way to do it directly from polars series to pandas series?
Why I need this is because I feed the data into statmodels.OLS and want to have variable names instead of numbers for variables. And when I feed the data into statmodels.OLS directly from polars I get the following error:
unrecognized data structures: <class 'polars.internals.series.Series'> / <class 'polars.internals.frame.DataFrame'>