Python Pandas equivalent in JavaScript

前端 未结 9 1131
时光取名叫无心
时光取名叫无心 2021-01-29 17:24

With this CSV example:

   Source,col1,col2,col3
   foo,1,2,3
   bar,3,4,5

The standard method I use Pandas is this:

  1. Parse CSV<

9条回答
  •  甜味超标
    2021-01-29 18:15

    I think the closest thing are libraries like:

    • ReclineJS
    • Miso Project Dataset

    Recline in particular has a Dataset object with a structure somewhat similar to Pandas data frames. It then allows you to connect your data with "Views" such as a data grid, graphing, maps etc. Views are usually thin wrappers around existing best of breed visualization libraries such as D3, Flot, SlickGrid etc.

    Here's an example for Recline:

    // Load some data
    var dataset = recline.Model.Dataset({
      records: [
        { value: 1, date: '2012-08-07' },
        { value: 5, b: '2013-09-07' }
      ]
      // Load CSV data instead
      // (And Recline has support for many more data source types)
      // url: 'my-local-csv-file.csv',
      // backend: 'csv'
    });
    
    // get an element from your HTML for the viewer
    var $el = $('#data-viewer');
    
    var allInOneDataViewer = new recline.View.MultiView({
      model: dataset,
      el: $el
    });
    // Your new Data Viewer will be live!
    

提交回复
热议问题