A computed column compares each element with the lowest. What does this print? import pandas as pd; df = pd.DataFrame({"sym": ["Sr", "Ba", "Cd"], "ie": [549, 503, 868]}); df["ratio"] = df["ie"] / df["ie"].min(); print(round(df["ratio"].iloc[0], 2))
Log in to join the discussion.
Loading…