You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Windows 8 (x64), with Pandas v0.17.0 (from Anaconda) and up, Pandas.DataFrame.where() function is found to behave sporadically, sometimes returning the expected result and sometimes returning a dataframe filled with zeros.
The following code demonstrates this behavior, observed for dataframes that have larger than 361 rows and columns.
I observed that this problem does NOT exist in Pandas v0.16.2 on the same machine (Windows 8 x64, Anaconda), and in Pandas v0.17.1 under Mac OS (Anaconda).
importnumpyasnpimportpandasaspdn=400n_trials=1000df_1=pd.DataFrame(data=np.random.random((n,n)), index=np.arange(0,n), columns=np.arange(0,n))
df_2=pd.DataFrame(data=np.random.random((n,n)), index=np.arange(0,n), columns=np.arange(0,n))
count=0foriinxrange(0,n_trials):
res=df_1.where(df_2>0.5)
if (res<1e-6).all().all():
count+=1print"number of unexpected cases: ", count
returns non-zero counts.
The text was updated successfully, but these errors were encountered:
Under Windows 8 (x64), with Pandas v0.17.0 (from Anaconda) and up, Pandas.DataFrame.where() function is found to behave sporadically, sometimes returning the expected result and sometimes returning a dataframe filled with zeros.
The following code demonstrates this behavior, observed for dataframes that have larger than 361 rows and columns.
I observed that this problem does NOT exist in Pandas v0.16.2 on the same machine (Windows 8 x64, Anaconda), and in Pandas v0.17.1 under Mac OS (Anaconda).
returns non-zero counts.
The text was updated successfully, but these errors were encountered: