We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In [1]: pd.__version__ Out[1]: '0.13.1' In [2]: pd.DataFrame({'a': pd.SparseArray([1,2,3, np.nan, np.nan]), 'b': [1,2,3,np.nan,np.nan]}) Out[2]: a b 0 1 1 1 2 2 2 3 3 3 NaN NaN 4 NaN NaN [5 rows x 2 columns] In [3]: _2.reindex(_2.index[1:], fill_value=10.) Out[3]: a b 1 2 2 2 3 3 3 10 NaN 4 10 NaN [4 rows x 2 columns]
Also, this looks weird, I'd expect sparse array to preserve nans:
In [3]: pd.SparseArray([np.nan, np.nan], fill_value=0.0).to_dense() Out[3]: array([ 0., 0.])
The text was updated successfully, but these errors were encountered:
Dupe of #12797. Closing as #12797 has some discussions.
Sorry, something went wrong.
No branches or pull requests
Also, this looks weird, I'd expect sparse array to preserve nans:
The text was updated successfully, but these errors were encountered: