CData Python Connector for Pinterest

Build 20.0.7745

From Pandas

When combined with Pandas' DataFrames, the connector is used to generate numerous different graphics for the purpose of analytics.


In order to use Pandas it will need to be imported. Pandas will also rely on a SQLAlchemy engine when executing queries, as below:

import pandas as pd
from sqlalchemy import create_engine
engine = create_engine("pinterest:///?InitiateOAuth=GETANDREFRESH;OAuthClientId=YourClientId;OAuthClientSecret=YourClientSecret;CallbackURL='https://localhost:33333'")

Querying Data

SELECT queries are provided in a call to the "read_sql()" method in pandas, alongside a relevant connection object. Pandas will execute the query on that connection, and return the results in the form of a DataFrame, which are used for a variety of purposes. In order to use pandas, it will need to be imported:

df = pd.read_sql("""
	FROM USERS;""", engine)

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 20.0.7745