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
From SO
trains = np.arange(100) tresholds = [10, 20, 30, 40, 50, 60] tuples = [] for i in trains: for j in tresholds: tuples.append((i, j)) index = pd.MultiIndex.from_tuples(tuples, names=['trains', 'tresholds']) matrix = np.empty((len(index), len(trains))) matrix.fill(np.nan) df = pd.DataFrame(matrix, index=index, columns=trains, dtype=float)
Fails
df.to_sparse()
Ok
df.iloc[0] = 0 df.to_sparse()
The text was updated successfully, but these errors were encountered:
TST:Test to_sparse with nan dataframe (pandas-dev#10079)
48cd7e2
TST:Test to_sparse with nan dataframe (#10079) (#14913)
8c798c0
TST:Test to_sparse with nan dataframe (pandas-dev#10079) (pandas-dev#…
71a5c59
…14913)
Successfully merging a pull request may close this issue.
From SO
Fails
Ok
The text was updated successfully, but these errors were encountered: