2
說我有一個數據幀如下,如何用1代替大於0.6的值,用0代替小於0.3的值,用0替換所有的值-1如何有條件地替換熊貓數據幀
aaa bbb ccc
0 0.953893 0.977473 0.034157
1 0.693851 0.587930 0.584268
2 0.357185 0.429399 0.937016
3 0.384505 0.670054 0.657566
4 0.782799 0.479501 0.196721
5 0.548724 0.487478 0.277674
6 0.019224 0.426555 0.047267
7 0.746972 0.569147 0.973555
8 0.755425 0.885270 0.825515
9 0.427994 0.013501 0.982629