Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sparse=True option for from_dataframe and from_series #3210

Merged
merged 5 commits into from
Aug 27, 2019

Commits on Aug 13, 2019

  1. sparse=True option for from_dataframe and from_series

    Fixes pydata#3206
    
    Example usage:
    
        In [3]: import pandas as pd
           ...: import numpy as np
           ...: import xarray
           ...: df = pd.DataFrame({
           ...:     'w': range(10),
           ...:     'x': list('abcdefghij'),
           ...:     'y': np.arange(0, 100, 10),
           ...:     'z': np.ones(10),
           ...: }).set_index(['w', 'x', 'y'])
           ...:
    
        In [4]: ds = xarray.Dataset.from_dataframe(df, sparse=True)
    
        In [5]: ds.z.data
        Out[5]: <COO: shape=(10, 10, 10), dtype=float64, nnz=10, fill_value=nan>
    shoyer committed Aug 13, 2019
    Configuration menu
    Copy the full SHA
    39c7e34 View commit details
    Browse the repository at this point in the history
  2. Typing fixes

    shoyer committed Aug 13, 2019
    Configuration menu
    Copy the full SHA
    5a67123 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2019

  1. fixes per review

    shoyer committed Aug 15, 2019
    Configuration menu
    Copy the full SHA
    6824278 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2019

  1. use a string for Series.name

    shoyer committed Aug 16, 2019
    Configuration menu
    Copy the full SHA
    94eeea3 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2019

  1. fix test failure

    shoyer committed Aug 21, 2019
    Configuration menu
    Copy the full SHA
    3cfd9a0 View commit details
    Browse the repository at this point in the history