<gh_stars>0
# -*- coding: utf-8 -*-
"""Index_Setter.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/19BASF--tradFuUgNUemL0y1VdDQaARcf
"""

import pandas as pd
import os
import numpy as np

def processor(x, input_path, output_path):
    df = pd.read_csv(input_path + x, sep = ',', encoding = 'utf-8')
    df.rename(columns = {'Unnamed: 0': 'Time'}, inplace = True)
    df['Time'] = np.array(df.Time.values, dtype = np.datetime64)
    df.set_index('Time', inplace = True)

    df.to_csv(output_path + x, sep = ',', encoding = 'utf-8', header = True, index = True)

def set_index(input_path, output_path):
    df = pd.DataFrame({'File_Name': os.listdir(input_path)}, dtype='object')
    df.File_Name.apply(lambda name: processor(name, input_path, output_path))
# -*- coding: utf-8 -*-
"""Index_Setter.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/19BASF--tradFuUgNUemL0y1VdDQaARcf
"""

import pandas as pd
import os
import numpy as np

def processor(x, input_path, output_path):
    df = pd.read_csv(input_path + x, sep = ',', encoding = 'utf-8')
    df.rename(columns = {'Unnamed: 0': 'Time'}, inplace = True)
    df['Time'] = np.array(df.Time.values, dtype = np.datetime64)
    df.set_index('Time', inplace = True)

    df.to_csv(output_path + x, sep = ',', encoding = 'utf-8', header = True, index = True)

def set_index(input_path, output_path):
    df = pd.DataFrame({'File_Name': os.listdir(input_path)}, dtype='object')
    df.File_Name.apply(lambda name: processor(name, input_path, output_path))
# -*- coding: utf-8 -*- Index_Setter.ipynb  Automatically generated by Colaboratory.  Original file is located at     https://colab.research.google.com/drive/19BASF--tradFuUgNUemL0y1VdDQaARcf