# Missing column when accessing hubspot-api-client (python)

**URL:** <https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [October 25, 2021, 5:04pm UTC](https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898 "2021-10-25T17:04:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KikalaT](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@KikalaT](https://community.hubspot.com/u/KikalaT)\
**Post date:** [October 25, 2021, 5:04pm UTC](https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898/1 "2021-10-25T17:04:24Z")

</div>

Hi folks,

I’m experiencing some missing columns issues when accessing Hubspot API programmatically through Python.

Our model is divided into 3 main tables (DEALS, COMPANIES and CONTACTS)

I’m fectching all DEALS columns as follows :

```lia-code-sample
deals_properties = api_client.crm.properties.core_api.get_all(object_type="DEALS")
deals_colonnes = {x['name']:x['label'] for x in deals_properties.to_dict()['results']}

all_deals = api_client.crm.deals.get_all(properties=list(deals_colonnes.keys()))
all_deals_properties = [x.to_dict()['properties'] for x in all_deals]

df_deals = pd.DataFrame.from_records(all_deals_properties)

df_deals = df_deals.rename(columns=deals_colonnes)

```

I’m missing someting ?

Yours truly,

K.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 26, 2021, 5:23pm UTC](https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898/2 "2021-10-26T17:23:33Z")

</div>

@BJacobson , any chance you could help out a friend in need 😉

---

<div class="post-metadata">

**Author:** ![BJacobson](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@BJacobson](https://community.hubspot.com/u/BJacobson)\
**Post date:** [October 26, 2021, 5:58pm UTC](https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898/3 "2021-10-26T17:58:36Z")

</div>

> **[Search the CRM - HubSpot docs](https://developers.hubspot.com/docs/api-reference/latest/crm/search-the-crm)**
>
> The CRM search endpoints make getting data more efficient by allowing developers to filter, sort, and search across any CRM object type.

I think the deals\_columns variable should be formatted as a JSON. The above link has some samples that will need to be modified to work with python.

feel free to check out my Hubspot Post on GitHub (it is for importing contacts, but the JSON format should be able to be copied and modified for your export)

Cheers,

Brandon

[https://github.com/KayakerS6/HubSpotPythonAPI](mailto:kayakers6@gmail.com)

[kayakers6@gmail.com](mailto:kayakers6@gmail.com)

---

<div class="post-metadata">

**Author:** ![KikalaT](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@KikalaT](https://community.hubspot.com/u/KikalaT)\
**Post date:** [October 27, 2021, 9:18am UTC](https://community.hubspot.com/t/missing-column-when-accessing-hubspot-api-client-python/45898/4 "2021-10-27T09:18:17Z")

</div>

Hi Brandon,  
I need to make further investigations as the problem might inherent from our own model.

I will accept your reply as a solution and keep you informed.

Best,  
Kikala.
