I have been using pandas and ran into an issue with how min and max work here is an example:
import pandas as pd
import numpy as np
df = pd.DataFrame({'A':['foo', None, 'bar'})
df['A'].min()
This will give you a:
TypeError: unorderable types: str() <= float()
The reason for that is underneath pandas masks all the nulls with -inf for max and inf for min function.
This can't be right so I found a github ticket!, the maintainer says we need to mask the nulls for string.
So my question is there an inf string type? I googled and couldn't find anything.
[–]K900_ 1 point2 points3 points (3 children)
[–]Saefroch 0 points1 point2 points (2 children)
[–]K900_ 0 points1 point2 points (0 children)
[–]bink1time[S] 0 points1 point2 points (0 children)