# Custom Code Workflow - Pandas

**URL:** <https://community.hubspot.com/t/custom-code-workflow-pandas/81652>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [May 20, 2023, 6:58pm UTC](https://community.hubspot.com/t/custom-code-workflow-pandas/81652 "2023-05-20T18:58:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LRoy6](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@LRoy6](https://community.hubspot.com/u/LRoy6)\
**Post date:** [May 20, 2023, 6:58pm UTC](https://community.hubspot.com/t/custom-code-workflow-pandas/81652/1 "2023-05-20T18:58:51Z")

</div>

I am trying to run some custom code in my workflow that involves reading a dataframe using pandas. However, whenever I run the code I get this error:

`Runtime.ImportModuleError: Unable to import module 'hubspotHandler': cannot import name 'pandas' from 'hubspot' (/opt/python/hubspot/ __init__.py)`

Anyone know how to install pandas with this?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 22, 2023, 4:46pm UTC](https://community.hubspot.com/t/custom-code-workflow-pandas/81652/2 "2023-05-22T16:46:54Z")

</div>

Hey, @LRoy6 👋 Thanks for reaching out. I’d like to invite some of our community members to the conversation. Hey, @ChrisoKlepke @taran42 @himanshurauthan, how would you tackle this? Would you handle it outside using a [custom coded workflow action](https://developers.hubspot.com/docs/api/workflows/custom-code-actions#:~:text=Python%20supported%20libraries)?

Something similar to this?

- Run your pandas code in a local or cloud-based Python environment
- Use the results of your pandas code to decide what actions to take in HubSpot
- Use the HubSpot APIs to take care of business 😊

Remember to secure your keys when interacting with the HubSpot APIs, and be mindful of [API rate limits](https://developers.hubspot.com/docs/api/usage-details).

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![JSuwinski](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@JSuwinski](https://community.hubspot.com/u/JSuwinski)\
**Post date:** [January 30, 2024, 4:34pm UTC](https://community.hubspot.com/t/custom-code-workflow-pandas/81652/3 "2024-01-30T16:34:58Z")

</div>

Were there any solutions around this question?

I’m trying to do the same thing.
