Create a Static Method that takes a Deedle dataframe as a parameters and returns a Deedle dataframe in C#

198 views Asked by At

I'm trying to create a static method that takes Deedle dataframes as parameters and returns a Deedle dataframes in C#. What is the the type to use when declaring such a static method and what is the format to declare a very generic form of a Deedle Dataframe? Below I created a static method that takes doubles as input parameters, instantiates a blank variable of type double in the method, and returns a double. Essentially, I'd like to do something very similar with Deedle dataframes.

namespace MathTestJunk
{
    class ScrapClass
    {
        public static double SimpleMethod(double Input1, double Input2)
        {
            double TempDouble;
            TempDouble = (Input1 * 5.0) + (Input2 * + 9.2);
            return TempDouble;
        }

    }
}

Loading up the dataframes from CSV's looks like this:

Dataframe1 = Frame.ReadCsv("C:/Users/Table1.csv");
Dataframe2 = Frame.ReadCsv("C:/Users/Table2.csv");
1

There are 1 answers

0
Gaspare Bonventre On
public static Deedle.Frame<int, string> SomeStaticMethod(Deedle.Frame<int, string> InputDf1, Deedle.Frame<int, string> InputDf2)
{
        var OutputDf = InputDf1.Join(InputDf2);

        return OutputDf;    
}