Pandas Series: str.casefold() function
Series-str.casefold() function
The str.casefold() function is used to convert strings in the Series/Index to be casefolded.
The method is equivalent to str.casefold().
Syntax:
Series.str.casefold(self)
Returns: Series/Index of objects
Example:
Python-Pandas Code:
import pandas as pd
s = pd.Series(['flower', 'CAPTAIN', 'this is my pen', 'FoOtBaLl'])
s.str.casefold()
Output:
0 flower 1 captain 2 this is my pen 3 football dtype: object
Previous: Series-str.capitalize() function
Next: Series-str.cat() function
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/pandas/series/series-str-casefold.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics