How to use the @jupyterlab/csvviewer.CSVModel function in @jupyterlab/csvviewer

To help you get started, we’ve selected a few @jupyterlab/csvviewer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should be the number of columns in the region', () => {
        let model = new CSVModel({ content: CSV_DATA });
        expect(model.columnCount('row-header')).to.be(1);
        expect(model.columnCount('body')).to.be(4);
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should instantiate a `CSVModel`', () => {
        let model = new CSVModel();
        expect(model).to.be.a(CSVModel);
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should be the number of rows in the region', () => {
        let model = new CSVModel({ content: CSV_DATA });
        expect(model.rowCount('column-header')).to.be(1);
        expect(model.rowCount('body')).to.be(1002);
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should accept content and delimiter values', () => {
        let content = 'foo';
        let delimiter = '\t';
        let model = new CSVModel({ content, delimiter });
        expect(model).to.be.a(CSVModel);
        expect(model.content).to.be(content);
        expect(model.delimiter).to.be(delimiter);
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should be settable', () => {
        let model = new CSVModel({ content: CSV_DATA });
        expect(model.content).to.be(CSV_DATA);
        model.content = 'foo';
        expect(model.content).to.be('foo');
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should default to `,`', () => {
        let model = new CSVModel();
        expect(model.delimiter).to.be(',');
      });
github jupyterlab / jupyterlab / test / src / csvviewer / table.spec.ts View on Github external
it('should get the data for the region', () => {
        let model = new CSVModel({ content: CSV_DATA });
        expect(model.data('row-header', 1, 1)).to.be('2');
        expect(model.data('column-header', 1, 1)).to.be('name');
        expect(model.data('corner-header', 1, 1)).to.be('');
        expect(model.data('body', 2, 2)).to.be('49.71.100.63');
      });