US Counties

פרמיום
על ידי Aptitude Apps, LLC | מְעוּדכָּן il y a 2 mois | Data
פּוֹפּוּלָרִיוּת

8 / 10

חֶבִיוֹן

438ms

רמת שירות

79%

Health Check

N/A

חזרה לכל הדיונים

Question on data usage formats

Rapid account: Spiderman 04
spiderman04
il y a 4 mois

The doc says a list is returned however, if you look at the data it should be a list of dictionaries objects which we can cycle through easily in Python. I wanted a simple comma-delimited line for each state.

The code shows a long single string object versus a list. How to do we use this in code?

Generic Code: convert list to empty then traverse

data_list = []
data_list.append(data.decode(“utf-8”))

#loop the Dictionary item in returned message?
for itemDict in data_list:

        # loop thru key/val pair looking for specific items
        for k, v in itemDict.items():
                print(str(k) + "=" + str(v), end=',')
Rapid account: Aptitudeapps
aptitudeapps Commented il y a 4 mois

Hello. We do not specify that lists are returned. Our APIs return data in proper JSON format. It’s up to the developer to determine how to use it. There are many, many programming languages and not just python.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות