Skip to content

Instantly share code, notes, and snippets.

@nexosisops
Last active January 24, 2018 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nexosisops/21efbf3016e587f7e4f491b1985a2361 to your computer and use it in GitHub Desktop.
Save nexosisops/21efbf3016e587f7e4f491b1985a2361 to your computer and use it in GitHub Desktop.
Nexosis Python Client Sample
# Submit dataset
client = nexosisapi.Client()
with open('sales-file.csv') as f:
result = client.datasets.create_csv('widget-sales', f)
# Create a forecast for the next 30 days on the 'sales' column
session = client.sessions.create_forecast(
'widget-sales',
'daily_transaction',
date_parser.parse('2017-12-12 00:00:00 -0:00'),
date_parser.parse('2017-12-22 00:00:00 -0:00')
)
# Retrieve forecast results
results = client.sessions.get_results(session.session_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment