skip to Main Content

Why does Python Flask convert lists of dicts in JSON to a string of just the first item in the list, or just its keys?

Flask in Python is converting all of my lists to strings. Here is my code: class OpenAI(Resource): # methods go here def post(self): parser = reqparse.RequestParser() # initialize parser.add_argument('model', type=str, required=True) # add arguments parser.add_argument('conversation', type=list, required=True) parser.add_argument('functions', type=list, required=False)…

VIEW QUESTION

Convert JSON into a Pandas Dataframe

I have a below JSON object that is retrieved by a query r = {'metaData': [{'columnAliases': ['ltp', 'mcap', 'wsma30uptrend','15 day contraction'], 'availableLimit': 477, 'maxRows': 1, 'isTrend': True, 'limit': 2, 'groups': ['symbol'], 'tradeTimes': [1692210600000], 'lastUpdateTime': 1692266340000}], 'groups': ['BALRAMCHIN', 'GHCL'], 'time': 138,…

VIEW QUESTION
Back To Top
Search