Giter Site home page Giter Site logo

Comments (2)

maartenbreddels avatar maartenbreddels commented on April 29, 2024

@quiquinSP:

What I had in mind, are a few methods in the Dataset class like

  • as_dataframe (for pandas)
  • as_astropy_table
  • as_numpy (a dict with numpy arrays)

It makes sense for them to take a 'selection' argument, see for instance Dataset.scatter, and the arguments column_names and virtual like export_hdf5, possibly a strings argument like Dataset.get_column_names(..). It may be convenient to give the as_numpy method an extra with_units=False argument to put in the units (see http://docs.astropy.org/en/stable/units/ ). Astropy tables can also take units, for pandas dataframe I am not sure.
You might want to check out in Dataset.scatter how I protect against converting too much data, or see https://github.com/maartenbreddels/vaex/blob/2754156da08fd4fad2555fdf0d85373ebae10a35/vaex/export.py#L291 how I protect against using too much memory, and similary in the gui https://github.com/maartenbreddels/vaex/blob/master/vaex/ui/main.py#L1070 (Just noticed that the gui code should be refactored to use the vaex.utils)
Please also include unittests, looking forward to see you PR!

from vaex.

maartenbreddels avatar maartenbreddels commented on April 29, 2024

Implemented in 7ca315b, with a short description here:
http://vaex.astro.rug.nl/latest/getting_data_in_vaex.html#getting-your-data-out
should be available in the next release

from vaex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.