Polars : Is there a json_normalize like feature in Polars?

Viewed 525

I went through the entire documentation of Polars but couldn't find anything which could convert nested json into dataframe.

test = {
  "name": "Ravi",
  "Subjects": {
    "Maths": 92,
    "English": 94,
    "Hindi": 98
  }
}

json_normalize in pandas would convert this to a dataframe by naming the columns as name, Subjects.Maths, Subjects.English and Subjects.Hindi. So is this a possibility in Polars? I did try all the functions but it always throws an error as it doesn't undersand the nested structure.

1 Answers

No there is not, AFAIK it is recommended to use the pandas function and then load the pandas data frame into polars.

Related