Open ikaitsas opened 1 year ago
mallon tha afairesw to parse_date=True apo thn read_csv() methodo, pou metatrepei thn sthlh apo string se datetime (kai thn thetei index sto telos) kai tha afhsw mono thn entolh: df2.index=pd.to_datetime(df2.index.astype(str), errors='coerce')
mhpws kai einai pio grhgoro etsi (an doulepsei)
p.x. sto Solar_1min_2018.txt kapoia stoixeia ths sthlhs datetime den mporoun na ginontai parsed ws datetimes, opote kai o df2.index einai typou 'string' kai oxi 'datetime64', wste na diavazontai ws hmeromhnies ta stoixeia thss sthlhs auths
den ginetai localize gia auton ton logo, opote kai den sugxronizontai ta df kai df2 (Z data me irradiance data)
to provlhma lythike pros to paron me tis parakatw prosthikes: if df2.index.inferred_type != 'datetime64': df2.index=pd.to_datetime(df2.index.astype(str), errors='coerce') if type(df2.index) != pd.core.indexes.datetimes.DatetimeIndex: df2.index=pd.to_datetime(df2.index.astype(str), errors='coerce')
tha to psaksw poia methodos ston elegxo if einai einai pio grhgorh kai genikoterh kai tha valw ekeinh pros to paron exw thn prwth