<jupyter_start><jupyter_text>This notebook try to figure out a way to get the time series that can be sorted by python<jupyter_code>import pandas as pd
import numpy as np
import datetime
nortech = pd.read_excel('Cleaned_data/nortech_6.6kw_tracking_cleaned.xlsx')
nortech = nortech.fillna("")
uaf = pd.read_excel('Cleaned_data/uaf_fairbanks_cleaned.xlsx')
uaf = uaf.fillna("")
# for i in range(len(nortech.index)):
#     if nortech['Month'][i] == 'November':
#           nortech['Month'][i] =nortech['Month'][i].replace('November','1')
#           print(nortech['Month'][i])
# get a column ['Date'],which is in the format of 'Year_month'
def change_month(dataframe):
    Month_change = {'November':11,'December':12,'January':1,'February':2,'March':3,'April':4,'May':5,'June':6,'July':7,'August':8,'September':9,'October':10}
    dataframe['Month'] = dataframe['Month'].map(Month_change)
    return(dataframe)


def create_date(dataframe):
    dataframe['Date'] = ""
    for i in range(len(dataframe)):
        dataframe['Date'][i] = str(dataframe['Year'][i]) + '-' + str(dataframe['Month'][i])
    dataframe.drop(['Year','Month'],axis = 1,inplace = True)
    order = ['Date','Energy','DC Capacity','Location']
    dataframe_new = dataframe[order]
    return(dataframe_new)

def add_time_col(dataframe):
    change_month(dataframe)
    create_date(dataframe)
    return(dataframe_new)
def add_time_col(dataframe):
    Month_change = {'November':11,'December':12,'January':1,'February':2,'March':3,'April':4,'May':5,'June':6,'July':7,'August':8,'September':9,'October':10}
    dataframe['Month'] = dataframe['Month'].map(Month_change)
    dataframe['Date'] = ""
    for i in range(len(dataframe)):
        dataframe['Date'][i] = str(dataframe['Year'][i]) + '-' + str(dataframe['Month'][i])
    dataframe.drop(['Year','Month'],axis = 1,inplace = True)
    order = ['Date','Energy','DC Capacity','Location']
    dataframe_new = dataframe[order]
    
    return(dataframe_new)
add_time_col(nortech)
nortech['Date'] = pd.to_datetime(nortech['Date'])
nortech<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19278846153846155, 'fraction_numerical': 0.016826923076923076, 'mean_word_length': 6.054237288135593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '546770', 'license': 'MIT', 'n_tokens_mistral': 761, 'n_tokens_neox': 730, 'n_words': 114, 'path': 'Change the time to Time series.ipynb', 'repo_name': 'acep-uaf/ACEP_solar', 'size': '2080'}