File size: 616 Bytes
7ab79fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5293c01
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pandas as pd
data_set_options = [
    'Airline',
    'Milk production'
]


def import_sample_data(sample_data_selected, data_set_options):
    if sample_data_selected == data_set_options[0]:
        data = pd.read_csv('data/processed/airline.csv',
                           parse_dates=['Month'], index_col='Month')

    if sample_data_selected == data_set_options[1]:
        data = pd.read_csv('data/processed/milk_production.csv',
                           parse_dates=['date'], index_col='date')

    graph_data = data.reset_index()
    graph_data.columns.values[0] = 'Date'
    return data, graph_data