I'm trying to create two columns in a new dataframe base on the Min and the Min from an existing dataframe. When groupby is used, it is giving min and max NAN values
df.groupby('street').min()['sold_price']
df.groupby('street').max()['sold_price']
sample from existing dataframe.
street_name sold_price
A 100,000
A 200,100
B 50,000
B 100,000
new dataframe should be
street_name min max
A 100,000 200,000
B 50,000 100,000