0

How can i remove any string contains of '?' , '?.' , '? ' and '? ' from my dataset in one code line instead of couple of lines as below:

data = data[(data != '?').all(axis=1)] data = data[(data != '?.').all(axis=1)] data = data[(data != '? ').all(axis=1)] data = data[(data != '? ').all(axis=1)]

  • This might be helpful: https://stackoverflow.com/questions/24554723/str-replace-for-multiple-value-replacement/24554744. – Pake Jun 18 '21 at 18:04

0 Answers0