text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

dF_Generation = pd.read_csv('../input/enerjisa-enerji-veri-maraton/generation.csv', sep=';')
dF_Generation.columns = ['DateTime', 'Generation']

dF_Generation.dtypes

dF_Sample = pd.read_csv('../input/enerjisa-enerji-veri-maraton/sample_submission.csv')

dF_Sample['DateTime'] = pd.to_datetime(dF_Sample['DateTime'])

dF_Generation['DateTime'] = pd.to_datetime(dF_Generation['DateTime'])

dF_Temperature = pd.read_csv('../input/enerjisa-enerji-veri-maraton/temperature.csv', sep=';')

dF_Temperature.dtypes

dF_Temperature['DateTime'] = pd.to_datetime(dF_Temperature['DateTime'])

dF_Temperature.dtypes

dF_Generation.dtypes

dF_Sample.dtypes

dF_Temperature.dtypes

dF_Temperature.isnull().sum()

dF_Generation.isnull().sum()

dF_Temperature = dF_Temperature.ffill(axis=0)

dF_Generation.isnull().sum()

dF_Temperature.isnull().sum()

dF_Sample.isnull().sum()

Generation_Başlangıç = dF_Generation['DateTime'].min()
Generation_Başlangıç

Generation_Bitiş = dF_Generation['DateTime'].max()
Generation_Bitiş

Sample_Başlangıç = dF_Sample['DateTime'].min()

Sample_Bitiş = dF_Sample['DateTime'].max()

dF_Temp_G = dF_Temperature[dF_Temperature['DateTime'].isin(pd.date_range(Generation_Başlangıç, Generation_Bitiş))]
dF_Temp_S = dF_Temperature[dF_Temperature['DateTime'].isin(pd.date_range(Sample_Başlangıç, Sample_Bitiş))]

dF_Gen_Temp = pd.merge(dF_Temp, dF_Generation, on='DateTime', how='inner')