-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
map_blocks returning pd.DataFrame fails with block_info parameter #11127
Comments
Thanks @joshua-gould . I can easily reproduce with what you have above. It seems that when Lines 901 to 926 in 484fc3f
This is obviously a problem as Would it be possible to convert the array to a dataframe and call map_partitions instead:
|
I'm trying to extract the indices and values of a 2-d array where the value > 0. I have a solution below using
|
Hmm, could you instead do this with arr = np.array([[-1, 2, 0], [4, -5, 6], [0, 0, 7]])
arr = da.from_array(arr)
indicies = da.nonzero(arr > 0) # or rely on dispatching with np.nonzero
arr[arr >0] |
Thanks for your response. I'm not sure how to create a dask dataframe using this approach. I tried:
But I get the warnings:
|
The text was updated successfully, but these errors were encountered: