Getting Started with Salesforce Data Analysis in Python

pip install
from simple_salesforce import Salesforcesf = Salesforce(username='', password='$ecret', security_token='SfheSnvrWjd2SnFHE')

Pulling Data

FROM Account
WHERE Name = ‘Sandy’
from sf import sf # assuming you put the authentication code in a 
# separate file called
data = sf.query_all(SOQL_HERE) # sf is the object we created earlier

Using Pandas

pip install pandas
import pandas as pddf_data = pd.DataFrame(data['records']).drop(column='attributes')



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmed Roach

Ahmed Roach

Direct response copywriter and marketing strategist