1 #ifndef DATAFRAME_HPP_INCLUDED
2 #define DATAFRAME_HPP_INCLUDED
19 #include <initializer_list>
20 #include <boost/any.hpp>
22 #include "utilCSV.hpp"
34 std::vector<std::vector<std::string> > fetchedStrDataStruct;
35 std::vector<std::string> colNames;
36 std::vector<std::string> colTypes;
38 void* obsDataFrame =
nullptr;
39 std::vector<std::string> obsRowNames;
53 void*
getObs(
int rowNumber);
54 std::vector<std::string>getColTypes();
56 void setColTypes(std::vector<std::string> cTypes);
57 void setColNames(std::vector<std::string> cNames);
58 node getNode(std::string vName=
"",
int vNumber = 0);
62 void setDfName(std::string);
66 std::vector<std::string>
readRowsSDS(std::vector<std::vector<std::string> > strDStruct,
int nCSVRows,
int colNumber);
68 void loadFromCSV(std::string csvFName,
bool header, std::vector<std::string> strVarTypes);
69 std::vector<std::vector<std::string> > makeDataFrame (std::vector<std::vector<std::string> > intStrDStruct);
71 void convertCSVtoDF(std::vector<std::vector<std::string> > strCSVStruct,
int nCSVRows,
int nCSVCols);
79 #endif // DATAFRAME_HPP_INCLUDED
void * getObs(int rowNumber)
Definition: dataframe.cpp:136
std::vector< std::string > getColNames()
Definition: dataframe.cpp:182
void setNode(node varNode, int vNumber)
Definition: dataframe.cpp:214
void displayNodeData(int position=0, std::string varName="")
Definition: dataframe.cpp:362
void setDataframe(std::vector< node > dframe)
Definition: dataframe.cpp:224
void createObsDataframe()
Definition: dataframe.cpp:101
void * getDataRange(int r1, int c1, int r2, int c2)
Definition: dataframe.cpp:171
std::vector< std::string > getRangeOfRows(int start, int ending)
Definition: dataframe.cpp:160
std::vector< std::string > readRowsSDS(std::vector< std::vector< std::string > > strDStruct, int nCSVRows, int colNumber)
Definition: dataframe.cpp:284
void saveToCSV(std::string csvFName)
Definition: dataframe.cpp:338
std::vector< std::string > createTypesVector()
Definition: dataframe.cpp:89
std::string toStringStream()
Definition: dataframe.cpp:370
void convertParsedVStrtoDf(std::vector< std::vector< std::string > > parsedVVS)
Definition: dataframe.cpp:245
void addObsRow(void *obsRow)
Definition: dataframe.cpp:195
std::vector< node > getDataframe()
Definition: dataframe.cpp:118
void loadFromCSV(std::string csvFName, bool header, std::vector< std::string > strVarTypes)
Definition: dataframe.cpp:255
void displayDataframe()
Definition: dataframe.cpp:346
node getNode(std::string vName="", int vNumber=0)
Definition: dataframe.cpp:149
boost::any createObsTuple()
Definition: dataframe.cpp:109
void convertCSVtoDF(std::vector< std::vector< std::string > > strCSVStruct, int nCSVRows, int nCSVCols)
Definition: dataframe.cpp:306
std::string getDataFrameName()
Definition: dataframe.cpp:126
Definition: dataframe.hpp:27