The following functions are used to perform vectorized string operations for arrays of dtype numpy. string_ or NumPy. unicode_. They are based on the standard string functions in Python’s built-in library.
Sr.No. | Function & Description |
---|---|
1 | Add() Returns element-wise string concatenation for two arrays of str or Unicode |
2 | Multiply() Returns the string with multiple concatenations, element-wise |
3 | Center() Returns a copy of the given string with elements centered in a string of specified length |
4 | Capitalize() Returns a copy of the string with only the first character capitalized |
5 | Title() Returns the element-wise title cased version of the string or Unicode |
6 | Lower() Returns an array with the elements converted to lowercase |
7 | Upper() Returns an array with the elements converted to uppercase |
8 | Split() Returns a list of the words in the string, using a separator delimiter |
9 | Splitlines() Returns a list of the lines in the element, breaking at the line boundaries |
10 | Strip() Returns a copy with the leading and trailing characters removed |
11 | Join() Returns a string which is the concatenation of the strings in the sequence |
12 | Replace() Returns a copy of the string with all occurrences of substring replaced by the new string |
13 | Decode() Calls str.decode element-wise |
14 | Encode() Calls str.encode element-wise |
These functions are defined in the character array class (numpy. char). The older Numarray package contained a char array class. The above functions in numpy.char class is useful in performing vectorized string operations.
Next Topic – Click Here
Pingback: NumPy char encode - Adglob Infosystem Pvt Ltd ....
Pingback: NumPy - Binary Operators - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Environment Setup - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Getting Started - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Jupyter Notebook - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Basic Concepts - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Plots with Glyphs - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Area Plots - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Circle Glyphs - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Rectangle Oval and Polygon - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Wedges and Arcs - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Specialized Curves - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Setting Ranges - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Axes - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Annotations and Legends - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Pandas - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - ColumnDataSource - Adglob Infosystem Pvt Ltd
Pingback: Bokeh - Filtering Data - Adglob Infosystem Pvt Ltd