Last active
January 24, 2018 21:48
-
-
Save nexosisops/21efbf3016e587f7e4f491b1985a2361 to your computer and use it in GitHub Desktop.
Nexosis Python Client Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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