title: How can i store data in a 2d vector?
body: <p>I have a piece of code where i read a CSV file and prints it contents. Now the issue is that I want to run my code on ESP32 and because of some limitations of micropython I can't upload my file in the spiffs storage. So is there any way I can store the csv file content in the code itself instead of reading it from the outside?</p>
  <p>My code:</p>
  <pre><code>vector&lt;vector&lt;double&gt; &gt; read_csv(const char *filename)
  {
      ifstream read_file(filename);
      vector&lt;vector&lt;double&gt; &gt; csv_data;
      std::string lineStr;
      while (getline(read_file, lineStr))
      {
          stringstream ss(lineStr);
          std::string d;
          vector&lt;double&gt; a_line_data;
          while (getline(ss, d, ','))
          {
              a_line_data.push_back(atof(d.c_str()));
          }
          csv_data.push_back(a_line_data);
      }
    //cout &lt;&lt; csv_data &lt;&lt; endl;
      return csv_data;
  }
  </code></pre>
  <p>This is how i print the contents:</p>
  <pre><code> vector&lt;vector&lt;double&gt; &gt; csv_data = read_csv(&quot;A00068.csv&quot;);
    // print tests 
    printf(&quot;CSV:%d\n&quot;, csv_data);
    printf(&quot;SIZE:%d\n&quot;, csv_data.size());
    
  </code></pre>