andrewgsavage

Results 264 comments of andrewgsavage

I can see myself using this of to_reduced_units. It requires a bit more set up - defining a list of preferred_units at the start of a file, but gives the...

Is there anything preventing this being merged? It would have been nice to have this in the last release.

This is different to the pandas extension dtype. Not sure how/if it's used in pandas, couldnt see anything when I searched.

> Now, I am curious if there is an even better way to add these wrappers to each necessary dunder method. Possibly a wrapper to the Polynomial class or by...

I've written something similar for water pump calculations too. My approach was to use pint-pandas to convert units to metric (any coherent unit system would work) and then drop units...

> I'm happy to open an issues in Pandas if people think that's a good option (it certainly looks the easier path to me). Ya that seems the easiest path...

`dir(obj)` calls `__dir__`, and `__dir__` returns a sorted list. We can override `__dir__` to return an unsorted list. Had a play and think I've worked out how to do it....

When you've created columns for some_values and factors, you've provided a list of quantities, which pandas treats as objects - and you see this when looking at the dtypes. When...

You aren't telling pandas to store the data using a PintArray so it converts it to a ndarray of objects. You need to use the dtype argument: ``` import pint...

`df['quantity'] = df.apply(lambda x: Quantity(x['variable_value'], x['unit']), axis=1).astype("pint[Hz]") ` it does not look correct; when you can see the unit in the column you can tell it's not read it correct...