As I am working on the NLP dataset while trying findall of regex function throwing an error.
import pandas as pd
d = {'text' : ['This is great','Ambience is good',5,'4/5', 'k', 'Love this place', 'Food was not as expected', 'Highly recomended']}
stats = pd.DataFrame(d)
stats.head()
Above is the data frame which contains numeric values on text columns. My concern is to treat these types of numeric or special characters (@,---,.,>,``). I am using the Regular Expressions function to treat such types of case but it is throwing an error.
test = stats.text.values
for t in test:
new_string = re.split('\W+',test)
new_string
TypeError: cannot use a string pattern on a bytes-like object