All Questions
2 questions
0
votes
1
answer
624
views
How to get column name from specific value per row in Python
I have a dataframe that looks like this:
listing_id price_4 price_5 price_6 price_7 price_8 price_9 min_price
0 42729 173.0 170.0 158.0 140.0 150.0 150.0 140.0
1 23135 184.0 ...
5
votes
1
answer
8k
views
How to get the minimum value of a row list in a pandas dataframe
I have a pandas dataframe with a column made of lists.
The goal is to find the min of every list in row (in an efficient way).
E.g.
import pandas as pd
df = pd.DataFrame(columns=['Lists', 'Min'])
df[...