first commit

This commit is contained in:
2026-05-21 08:40:24 -04:00
commit b084545275
711 changed files with 3659856 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import requests
from io import StringIO
import pandas as pd
def csv_url_to_dataframe(csv_url):
export_csv_stream = requests.get("https://pasbdc.neoserra.com/api/export?userid=6694&appid=181&appkey=bc03174a-f36c-45a6-a933-0f6e28062e9c", stream=True)
if export_csv_stream.status_code == 403:
print("Could not get export content, public IP not whitelisted.")
print(f'error: {export_csv_stream.text}')
raise Exception("Public ip not whitelisted in Neoserra export module. Find your public IP address and update your Neoserra preferences accordingly.")
elif export_csv_stream.status_code != 200:
raise Exception(f"Got a status code other than 200 when trying to download export module csv. got={export_csv_stream.text}")
decoded_csv = export_csv_stream.content.decode('utf-8')
df = pd.read_csv(StringIO(decoded_csv))
return df
print(df.head())