Hi there,
when trying to save the dataframes in the "Predictive Maintenance in .NET" notebook, DataFrame.ToCsv throws an InvalidCastException from within the function; code is as follows:
//constructing the label column which indicate if the current machine will //fail in the next
predTime` (24 hours as default) due to failur certain component.
//create final data frame from from feature df
var finalDf = new DataFrame(features_final);
//group failures by machineID and datetime
string[] cols = new string[] { "machineID" , "datetime"};
var failDfgrp = failures.GroupBy(cols);
//Add failure column to finalDF
finalDf.AddCalculatedColumn("failure", (object[]row, int i) => "none");
finalDf.RowCount();
DataFrame.ToCsv("../df1roll121212.txt", finalDf);
finalDf=DataFrame.FromCsv(@"../df1roll121212.txt");
`
And the stack trace:
Error: System.InvalidCastException: Invalid cast from 'Double' to 'DateTime'. at System.Double.System.IConvertible.ToDateTime(IFormatProvider provider) at Daany.DataFrame.ToCsv(String filePath, DataFrame dataFrame, Char delimiter, String dateFormat, Boolean writHeader) at Submission#70.<<Initialize>>d__0.MoveNext() --- End of stack trace from previous location --- at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray
1 precedingExecutors, Func2 currentExecutor, StrongBox
1 exceptionHolderOpt, Func2 catchExceptionOpt, CancellationToken cancellationToken)