J'ai un dataframe comme ci-dessous [72 lignes x 25 colonnes]:df.ix obtient NAN comme sous-ensemble
Pin CPULabel Freq(MHz) DCycle Skew(1-3)min Skew(1-3)mean
0 Dif0 BP100_Fast 99.9843 0.492 0 0
1 Dif0 BP100_Slow 100.011 0.493 0 0
2 Dif0 100HiBW_Fast 100.006 0.503 0 0
3 Dif0 100HiBW_Slow 100.007 0.504 0 0
4 Dif0 100LoBW_Fast 100.005 0.503 0 0
5 Dif0 100LoBW_Slow 99.9951 0.504 0 0
8 Dif1 BP100_Fast 99.9928 0.492 7 10
9 Dif1 BP100_Slow 99.9962 0.492 11 12
10 Dif1 100HiBW_Fast 100.014 0.502 10 11
11 Dif1 100HiBW_Slow 100.006 0.503 6 13
12 Dif1 100LoBW_Fast 99.9965 0.502 5 10
13 Dif1 100LoBW_Slow 99.9946 0.503 12 14
16 Dif2 BP100_Fast 99.9929 0.493 2 6
17 Dif2 BP100_Slow 99.997 0.493 8 13
18 Dif2 100HiBW_Fast 100.002 0.504 4 9
19 Dif2 100HiBW_Slow 99.9964 0.504 13 17
20 Dif2 100LoBW_Fast 100.021 0.504 8 9
Je suis juste intéressé par les lignes qui contiennent des chaînes BP100_Fast, 100HiBW et 100HiBW. Alors je la la commande ci-dessous:
excel = pd.read_excel('25C_3.3V.xlsx', skiprows=1)
excel.fillna(value=0, inplace=True)
general = excel[excel['Pin'] != 'Clkin']
general.drop_duplicates(keep=False, inplace=True)
slew = general[(general['CPULabel']=='BP100_Fast') | (general['CPULabel']=='100LoBW_Fast') | (general['CPULabel']=='100HiBW_Fast')]
Je suis en mesure d'obtenir ce que je veux [36 lignes x 25 colonnes]:
Pin CPULabel Freq(MHz) DCycle Skew(1-3)min Skew(1-3)mean
0 Dif0 BP100_Fast 99.9843 0.492 0 0
2 Dif0 100HiBW_Fast 100.006 0.503 0 0
4 Dif0 100LoBW_Fast 100.005 0.503 0 0
8 Dif1 BP100_Fast 99.9928 0.492 7 10
10 Dif1 100HiBW_Fast 100.014 0.502 10 11
12 Dif1 100LoBW_Fast 99.9965 0.502 5 10
16 Dif2 BP100_Fast 99.9929 0.493 2 6
18 Dif2 100HiBW_Fast 100.002 0.504 4 9
20 Dif2 100LoBW_Fast 100.021 0.504 8 9
Cependant, si je changeais la dernière commande:
slew = general.ix[['BP100_Fast', '100LoBW_Fast', '100HiBW_Fast'], :]
J'ai obtenu NAN comme résultat. [3 lignes x 25 colonnes]
Pin CPULabel Freq(MHz) DCycle Skew(1-3)min Skew(1-3)mean
BP100_Fast NaN NaN NaN NaN NaN NaN
100LoBW_Fast NaN NaN NaN NaN NaN NaN
100HiBW_Fast NaN NaN NaN NaN NaN NaN
Y a-t-il un moyen de compléter cela avec df.ix? Merci beaucoup.
Merci, cela aide beaucoup. – Dogod