forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
833c5bd
commit da5dfd1
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# BUG: 1.3.0 column assignment via single columnnp.matrix behaviour change #42376 | ||
|
||
import numpy as np | ||
from scipy import sparse | ||
|
||
import pandas as pd | ||
|
||
print(pd.__version__) | ||
|
||
|
||
X = sparse.random(100, 100, density=0.2, format="csr") | ||
df = pd.DataFrame({"a": np.arange(100)}) | ||
df["X_sum"] = X.sum(axis=1) | ||
print(df) |