NabUNC Posted June 23, 2022 Share Posted June 23, 2022 Hi y'all. I'm trying to do something simple, and think I'm close, but getting a little tripped up. Hope someone can help? I'm trying to use the API to pull in the list of product names that are on my Commerce site. I'm working in Python because of other data processing steps. cURL works fine in Terminal, but I'm not able to pipe the output into a pandas dataframe. import json import pandas as pd import requests headers = { Â Â "Authorization": "Bearer xxxxxxxxxxxx", Â Â "User-Agent": "Get all samples", Â Â Â "Content-Type": "application/json", } response = requests.get("https://api.squarespace.com/1.0/commerce/products", headers=headers) response.raise_for_status() df = pd.DataFrame(response("name")) Â Can anyone help with this last step? Thanks so much in advance! Â Link to comment
Enny.nz Posted November 25, 2023 Share Posted November 25, 2023 Hey! did you ever managed to get this done. I'm looking for a solution too 🙂 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment