def MakeBlock(dataFrame, E=0, tau=1, columnNames="", verbose=False): '''Takens time-delay embedding on columnNames in Pandas DataFrame. Truncates the timeseries by tau * (E-1) rows.''' if not isinstance(dataFrame, DataFrame): raise Exception("MakeBlock(): dataFrame is not a Pandas DataFrame.") DF = pyEDM.AuxFunc.PandasDataFrametoDF(dataFrame) # D is a Python dict from pybind11 < cppEDM Embed D = pyBindEDM.MakeBlock(DF, E, tau, columnNames, verbose) df = DataFrame(D) # Convert to pandas DataFrame return df
def MakeBlock(dataFrame, E=0, tau=-1, columnNames=[], deletePartial=False): '''Takens time-delay embedding on columnNames in Pandas DataFrame. NaN will be present in tau * (E-1) rows if deletePartial False.''' if not isinstance(dataFrame, DataFrame): raise Exception("MakeBlock(): dataFrame is not a Pandas DataFrame.") DF = pyEDM.AuxFunc.PandasDataFrametoDF(dataFrame) # D is a Python dict from pybind11 < cppEDM Embed D = pyBindEDM.MakeBlock(DF, E, tau, columnNames, deletePartial) df = DataFrame(D) # Convert to pandas DataFrame return df