Home > other >  Python dataframe scope
Python dataframe scope

Time:09-25

Dataframe raw data
The index value of
0 to 10
1
502 100
Data2=data [(data [' amount '] & gt; 0) & amp; (data [' amount '] <50)]

The output value is 10, and 50, why not ten?

CodePudding user response:

,50,100 data=https://bbs.csdn.net/topics/pd.DataFrame ([10], the columns=[' amount '])
10 # 0
50 # 1
# 2 100
Print (data)
Data2=data [(data [' amount '] & gt; 0) & amp; (data [' amount '] <50)]
Print (data2)


The amount of
0 to 10
1
502 100
The amount of
0 to 10

CodePudding user response:

See where I went wrong, I tried no problem
  • Related