Reindex Dataframe
Verfasst: Mittwoch 14. August 2013, 10:16
Hallo, ich habe eine csv, die wie folgt gefüllt ist
Spalte A Spalte B
x
2012 01 01 01:00:00 231.56
2012 01 01 01:01:00 231.58
2012 01 01 01:02:00 231.59
Also immer erst das Datum (JJJJ MM TT hh:mm:ss) und dann einen Wert.
Allerdings fehlen mir in Spalte A einzelne Minuten und ich möchte sie über reindex auffüllen (von 516000 auf 527000 Werte).
import csv
import pandas as pd
import numpy as np
from scipy import *
from numpy import *
import matplotlib.pyplot as plt
import pytz
from datetime import datetime, timedelta
dF = pd.read_csv("Volumenstrom_Hs1.csv", sep=';', parse_dates=0, index_col=0)
newperiod = 527040
index = pd.date_range(dF.index[0], periods=newperiod, freq='1min')
dF1 = dF.reindex(index)
Fehler ist "module object has no attribute 'data range'".
Was ist verkehrt?
Spalte A Spalte B
x
2012 01 01 01:00:00 231.56
2012 01 01 01:01:00 231.58
2012 01 01 01:02:00 231.59
Also immer erst das Datum (JJJJ MM TT hh:mm:ss) und dann einen Wert.
Allerdings fehlen mir in Spalte A einzelne Minuten und ich möchte sie über reindex auffüllen (von 516000 auf 527000 Werte).
import csv
import pandas as pd
import numpy as np
from scipy import *
from numpy import *
import matplotlib.pyplot as plt
import pytz
from datetime import datetime, timedelta
dF = pd.read_csv("Volumenstrom_Hs1.csv", sep=';', parse_dates=0, index_col=0)
newperiod = 527040
index = pd.date_range(dF.index[0], periods=newperiod, freq='1min')
dF1 = dF.reindex(index)
Fehler ist "module object has no attribute 'data range'".
Was ist verkehrt?