AttributeError: 'float' object has no attribute 'split' when ...
stackoverflow.com › questions › 51630870Sep 05, 2018 · AttributeError: 'float' object has no attribute 'split' features = [(x["entity_id"], x["tags"].split(","),x["rating"], x["rank"],x["keywords"].split(",") ) for (index, x) in df.iterrows() if not isinstance(x, (int, float))]
How to solve the Attribute error 'float' object has no ...
stackoverflow.com › questions › 52736900Oct 10, 2018 · Show activity on this post. When I run the below code, it gives me an error saying that there is attribute error: 'float' object has no attribute 'split' in python. I would like to know why this error comes about. def text_processing (df): """""=== Lower case ===""" '''First step is to transform comments into lower case''' df ['content'] = df ['content'].apply (lambda x: " ".join (x.lower () for x in x.split () if x not in stop_words)) return df df = text_processing (df)