Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the get_dummies () method in Pandas

Shulou Source: shulou.com Published: 2022-06-01 14:54:28 10月04日 Update

This article is to share with you about how to use the get_dummies () method in Pandas. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Series.str.get_dummies (sep=' |') splits the string and returns a complex matrix of individual characters

Parameters:

Sep: string. Default is "|"

Return value:

Data frame (DataFrame)

> Series (['a | baked, np.nan,'a | c']) .str.get_dummies () a b c0101 0002 01 above is how to use the get_dummies () method in Pandas. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Characters methods strings more knowledge articles complex practical parameters that is work sessions data articles look knowledge points matrices industries details information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL macOS Shulou Tech Info Xiaomi