[英]How can we change data type of a data frame column from object to string in python?
I was taking all categorical variables using我正在使用所有分类变量
numerical = map_quest._get_numeric_data().columns
categorical = list(set(map_quest.columns) - set(numerical))
Using this, the 'Description' column (which contains description of that particular record) is also getting considered as 'object' which I don't want.使用它,“描述”列(包含该特定记录的描述)也被视为我不想要的“对象”。 I don't want to drop Description either as I would like to use it for later purpose.我也不想删除描述,因为我想将其用于以后的目的。
Is there any way we can convert 'Description' column to string?有什么方法可以将“描述”列转换为字符串?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.