Questions tagged [to-json]

Returns a JSON representation of the object(s)

108 questions
-1
votes
1 answer

How to get object instead of hash from Redis cache?

I am using redis cache for saving data. I am saving data using to_json. How should I get data so that it becomes like before save. Before save #1,…
Haseeb Ahmad
  • 7,914
  • 12
  • 55
  • 133
-2
votes
2 answers

Convert Pandas Dataframe to nested json-keep 2 columns

I have a DF with the following columns and data: I hope it could be converted to two columns, studentid and info, with the following format. the dataset is """ studentid course teacher grade rank 1 math A 91 1 1 history B 79 …
K.Liang
  • 1
  • 2
-2
votes
1 answer

How to create json from a list of dataframes in a for loop?

I have a list with multiple dataframes in it. I want create json for each df in list using for loop. I tried, dfsize=[df df df] for dfs in dfsize: dfs.to_json('areca{dfs}.json').format(dfs) Was met with the error: AttributeError: 'NoneType'…
Illuminate
  • 109
  • 2
  • 10
1 2 3 4 5 6 7
8