Example #1
0
    void testsdf(SimpleDf sdf, string startFilterDate, string endFilterDate)
    {
        sdf.OutputDebugInfoStatStr();
        var tdf = SimpleDf.Copy(sdf, "tdf");

        Debug.Log($"Copying completed");
        Debug.Log($"Copied {tdf.InfoStr()}");
        Debug.Log($"Cols: {tdf.InfoClassStr()}");
        Debug.Log($"Cols: {tdf.InfoInversionsStr()}");
        tdf.KeepColumns(new string[] { "Id", "Timestamp", "x", "y" });
        //tdf = SimpleDf.SortOnColumn(tdf, "Timestamp", descend:true, quiet: false);
        tdf.preferedFormat["Timestamp"] = "yyyy-MM-dd HH:mm:ss.fff";
        var tblst = tdf.GetBoolFilter("Timestamp", startFilterDate, endFilterDate);

        tdf = SimpleDf.Subset(tdf, "tdf", tblst);
        tdf.MakeNewFloatCol("testcol", 0.0f, 3.14f);
        tdf.FloatTimeFromDateString("Timestamp", "Elaptime");
        tdf.preferedFormat["Elaptime"] = "f2";
        tdf.WriteCsv("testcsvname.csv");
    }