I would like to remove special characters from a string into a .CSV file..
I used this command: hist_data_frame.encode('raw_unicode_escape').decode('utf-8')
but i got this error:
AttributeError: 'DataFrame' object has no attribute 'encode'
what's wrong here???
or exists any other way to avoid to incresing strings into a .csv file due to specials characters like:
á, é , í, ó, ú , etc
thanks out there..!!


Amit MohantyRank #112 · 20K reputationPosted Feb 6, 2020, 5:12 PM EST
Jaimin ShethiyaRank #177 · 13.7K reputationPosted Feb 6, 2020, 6:38 PM EST
try to below code.
var value = System.Text.RegularExpressions.Regex.Replace("your string", @"[^0-9a-zA-Z]+", string.Empty);
Thanks
Bhawna TutejaRank #2,418 · 584 reputationPosted Feb 9, 2020, 5:48 PM EST