Back to Blog
Airtable revenue5/26/2023 ![]() What stages are other deals at in the pipeline? What is the weighted value of these deals?.What is the value of our closed deals? Who has secured the most revenue?.What business questions do you want to answer? We’ve laid out some example questions for our sample sales pipeline data. Now it is time to start gaining insights from our data, but first up: The response from Airtable comes in the form of an ordered dictionary, which we’ve had to parse above. Converting the response into a Pandas DataFrame import pandas as pd sales = pd.DataFrame(response1, columns=response.keys()) reps = pd.DataFrame(response2, columns=response.keys()) sales = pd.concat(, axis=1), sales.apply(pd.Series)], axis=1) sales = pd.concat(, axis=1), sales.apply(pd.Series)], axis=1).fillna('') reps = pd.concat(, axis=1), reps.apply(pd.Series)], axis=1) reps = pd.concat(, axis=1), reps.apply(pd.Series)], axis=1).fillna('')Ībove we’ve assigned our responses to variables and read them into their respective DataFrames. We have pulled in 2 different responses the correspond to the two tables inside our Sales Pipeline base. Each Airtable base will provide its own API to create, read, update, and destroy records. Airtable’s REST API interface can be found here:, where you can access a list of all your Airtable bases. Where ‘AIRTABLE_API_KEY’ is the global variable we just set in our bash profile and ‘BASE_ID’ is the ID for the specific base we are working with. Let’s fetch the data: from airtable import airtable at = airtable.Airtable('BASE_ID', 'AIRTABLE_API_KEY') response1 = at.get('Sales Deals') response2 = at.get('Sales Reps') In Jupyterlab Fetching our dataįor the purpose of this guide, we will work with one of Airtable’s sample templates - the Sales Pipeline base. We are now ready to start using Airtable Python. Replacing “API_KEY” with the string you just copied.įrom the command line, run: source ~/.bash_profileĪirtable’s REST API interface can be found here. Open your bash profile in your preferred editor and enter the following: export 'AIRTABLE_API_KEY' = "API_KEY" Instead, we can set a global variable in our ~/.bash_profile. It is bad practice to have your API keys in the code you are running. You can do this in your Airtable account settings. Note that you will need to generate an API key for your account if you haven’t already. If you think your team could benefit from a more automated process for tracking metrics that impact decision-making.Īirtable Python uses Requests, which you can install by running: conda install -c anaconda requests -y.You are already using Airtable for some specific knowledge management - your sales CRM, for example - but are frustrated with the built-in data visualization features.So this guide will show how you can fetch Airtable data from a Jupyter Notebook, manipulate and visualize this data, all in Python. But to really supercharge your analytics, this work should be as automated as possible. It is possible (on the pro plan) to build charts using Airtable’s code blocks. However, sometimes we can have so much tabular data that it is hard to really grasp week-to-week developments. IntroductionĪirtable is an awesome tool for centralizing data and running multiple different segments of your business. This guide will walk you through how to connect to an Airtable base from a Jupyter notebook, pull in your data and plot it, all with python.
0 Comments
Read More
Leave a Reply. |