Skip to content

Tag: pandas

Restructure Pandas DataFrame

I have the following DataFrame: play_id position frame x y 1 A_1 1 0.1 0.1 1 A_2 1 0.1 0.1 1 B_1 1 0.1 0.1 1 A_1 2 0.1 0.1 1 A_2 2 0.1 0.1 1 B_1 2 0.1 0.1 2 A_1 1 0.1 0.1 2 B_1 1 0.1 0.1 2 B_2 1 0.1 0.1 2 A_1 2 0.1 0.1

How can I get a specific value from a pandas DataFrame?

I have a .df that looks something like this(df = pandas.read_csv(main_db)): itemName itemBrand itemCode itemStock some name some brand a 6 digit number some low number even more names even more brands nore 6-digit numbers more stocks Looks like that but with actual names and brands. Now if I use result = df[d…