Home > other >  The novice Python data processing for help
The novice Python data processing for help

Time:10-26

Data inside A 'type' column has A/B/C three valid values, some of the wrong column, if the value is not A 'type' this column is looking for A/B/C in line to see if there is A/B/C, so just fill in the 'type' this column, without A word to fill in for 'no type, I think I know should use the pandas the apply method, A custom function, but I don't know how to define functions with A line

Data 1 2 3 data type
Pandas 0.878954821 Beijing A
Pandas wuhan 0.956116995 B
Pandas xian 0.944263521 C
Pandas xian A
0.490292992Pandas xian 0.115273626 B
Python xian 0.019382754 B
Python 0.062906525 xian A
A 0.019382754 0.019382754 in xian
Xian Python 0.044986562 C
Xian Python 0.820041401 0.211048256
Xian Python 0.713243944 B
Xian Python 0.211048256 C
Python 0.614623924 xian A

CodePudding user response:

With positive side expression, line processing
  • Related