man-group / dtale

Visualizer for pandas data structures
http://alphatechadmin.pythonanywhere.com
GNU Lesser General Public License v2.1
4.72k stars 400 forks source link

Dtale.show() error with pyarrow backed pandas dataframe? #823

Closed Valence-Shinei closed 10 months ago

Valence-Shinei commented 11 months ago

Greetings, I'm pretty new to Github, but I've been using Dtale for probably around a year now. I recently updated Dtale and Pandas to newer version to take advantage of the pyarrow datatypes in Pandas. So far so good, but when I try to use Dtale.show() as I've done previously, I encounter:

TypeError: 'ArrowExtensionArray' with dtype int64[pyarrow] does not support reduction 'skew'

Attached is the quick setup I did to test this with some quick and dirty dummy data. Please let me know if I should provide more information to help determine if this is an issue. Thank you in advance for your time and consideration of my comments!

Screenshot 2023-11-01 233245 Screenshot 2023-11-01 233308 Screenshot 2023-11-01 233345 Screenshot 2023-11-01 233412 Screenshot 2023-11-01 233435 Screenshot 2023-11-01 233451

Valence-Shinei commented 11 months ago

However, no problems are observed using the standard pandas dataframe with numpy backed datatypes Screenshot 2023-11-01 233901

Valence-Shinei commented 11 months ago

What's also interesting is that Apache Arrow has an article about extension arrays in R, but not for Python 🤔

https://arrow.apache.org/docs/r/reference/new_extension_type.html

aschonfeld commented 11 months ago

Thanks for the detailed ticket @Valence-Shinei so I think what I can do (assuming I can't get the skew function to work) is that I'll just turn off the skew calculation for dtypes that don't have it.

Valence-Shinei commented 11 months ago

You're certainly welcome and if possible and not asking too much, that would be great!

Dtale has really helped me move from Excel into Python in an easier, familiar fashion as I'm learning more Python to upskill, so thank you and team for this amazing library 😊🤝💙.

On Thu, Nov 2, 2023, 11:56 Andrew Schonfeld @.***> wrote:

Thanks for the detailed ticket @Valence-Shinei https://github.com/Valence-Shinei so I think what I can do (assuming I can't get the skew function to work) is that I'll just turn off the skew calculation for dtypes that don't have it.

— Reply to this email directly, view it on GitHub https://github.com/man-group/dtale/issues/823#issuecomment-1791118154, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDIZ45BRZTHJGNFYZ6MA2Q3YCPGFBAVCNFSM6AAAAAA62IUSQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJRGEYTQMJVGQ . You are receiving this because you were mentioned.Message ID: @.***>

aschonfeld commented 10 months ago

@Valence-Shinei just released v3.8.0 to pypi (will be on conda-forge shortly) with this update. Let me know if it works. Also, if you haven't already would you mind putting your ⭐ on this repo? Thanks 🙏

Valence-Shinei commented 10 months ago

Certainly, I will review and I'll be glad to add my star to the repo 🤝.

My apologies, I'm new to github and this system, but I do want to help give credit and praise where it is due 😎🙌!

On Mon, Nov 27, 2023, 14:09 Andrew Schonfeld @.***> wrote:

@Valence-Shinei https://github.com/Valence-Shinei just released v3.8.0 to pypi (will be on conda-forge shortly) with this update. Let me know if it works. Also, if you haven't already would you mind putting your ⭐ on this repo? Thanks 🙏

— Reply to this email directly, view it on GitHub https://github.com/man-group/dtale/issues/823#issuecomment-1828511342, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDIZ45A3XASDMPKCT6VEBJTYGTXRBAVCNFSM6AAAAAA62IUSQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYGUYTCMZUGI . You are receiving this because you were mentioned.Message ID: @.***>

Valence-Shinei commented 10 months ago

Greetings Andrew, Unfortunately it looks like I'm receiving the same error =/ . Please see the attached screenshots indicating the error after the upgrade.

Screenshot 2023-11-28 202112 Screenshot 2023-11-28 202133 Screenshot 2023-11-28 202152 Screenshot 2023-11-28 202217 Screenshot 2023-11-28 202236 Screenshot 2023-11-28 202256

aschonfeld commented 10 months ago

@Valence-Shinei i'm sorry, for some reason I thought the function didn't exist. I didn't realize the exception is buried within the skew function. I'll release a hotfix handling this. Will keep you posted

aschonfeld commented 10 months ago

@Valence-Shinei just released v3.8.1 let me know how it goes

Valence-Shinei commented 10 months ago

Success =] ! Bravo and thank you Andrew and team 😁🤝!

Screenshot 2023-11-29 234730

Screenshot 2023-11-29 235934

Screenshot 2023-11-29 235957