home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 362945533

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1874#issuecomment-362945533 https://api.github.com/repos/pydata/xarray/issues/1874 362945533 MDEyOklzc3VlQ29tbWVudDM2Mjk0NTUzMw== 1217238 2018-02-04T22:26:44Z 2018-02-04T22:26:44Z MEMBER

Then I need to write the data to a postgres DB. I have tried parsing the array and using an INSERT for every row, but this is taking a very long time (weeks).

I'm not a particular expert on postgres but I suspect it indeed has some sort of bulk insert facilities.

However, when trying to convert my xarray Dataset to a Pandas Dataframe, I ran out of memory quickly.

If you're working with a 47GB netCDF file, you probably don't have a lot of memory to spare. Often pandas.DataFrame objects can use significantly more memory than xarray.Dataset, especially keeping in mind that an xarray Dataset can lazily reference data on disk but a DataFrame is always in memory. The best strategy is probably to slice the Dataset into small pieces and to individually convert those.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  293293632
Powered by Datasette · Queries took 4.076ms · About: xarray-datasette