Putting Asana Data into a Pandas dataframe

Hello,

I’m building a dashboard using Asana data from my organization and I’ve developed a python cleaning script that uses our Asana data to clean and create different calculations we would like to see. The problem is I’ve written this script using export csv Asana files. I want to try and connect to Asana via the Asana API through python and load all of the columns I need into a pandas dataframe. I’m pretty new to API’s so the documentation is a little confusing to me and how I can get custom fields from Asana as pandas columns. The dataframe looks weird and I’ve attached a photo of what my dataframe looks like from the code I’ve written so far.

Here is my code so far:

'“”"

client = asana.Client.access_token(personal_access_token)

me = client.users.me()

workspace_id = me[‘workspaces’][0][‘gid’]

my_portfolios = client.portfolios.find_all(params={‘workspace’:workspace_id, ‘owner’:‘work_email@business.com’})

for portfolios in my_portfolios:
projects_list = client.portfolios.get_items(portfolios[‘gid’])

for projects in projects_list:
    project_gid = projects['gid']
    custom_fields = client.custom_field_settings.get_custom_field_settings_for_project(project_gid)
    dataframe = pd.DataFrame(custom_fields)

“”"