- NumPy - I/O with NumPy
- NumPy - Histogram Using Matplotlib
- NumPy - Matplotlib
- NumPy - Linear Algebra
- NumPy - Matrix Library
- NumPy - Copies & Views
- NumPy - Byte Swapping
- Sort, Search & Counting Functions
- NumPy - Statistical Functions
- NumPy - Arithmetic Operations
- NumPy - Mathematical Functions
- NumPy - String Functions
- NumPy - Binary Operators
- NumPy - Array Manipulation
- NumPy - Iterating Over Array
- NumPy - Broadcasting
- NumPy - Advanced Indexing
- NumPy - Indexing & Slicing
- Array From Numerical Ranges
- NumPy - Array from Existing Data
- NumPy - Array Creation Routines
- NumPy - Array Attributes
- NumPy - Data Types
- NumPy - Ndarray Object
- NumPy - Environment
- NumPy - Introduction
- NumPy - Home
NumPy Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
NumPy - String Functions
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 pbrary.
Sr.No. | Function & Description |
---|---|
1 | Returns element-wise string concatenation for two arrays of str or Unicode |
2 | Returns the string with multiple concatenation, element-wise |
3 | Returns a copy of the given string with elements centered in a string of specified length |
4 | Returns a copy of the string with only the first character capitapzed |
5 | Returns the element-wise title cased version of the string or unicode |
6 | Returns an array with the elements converted to lowercase |
7 | Returns an array with the elements converted to uppercase |
8 | Returns a pst of the words in the string, using separatordepmiter |
9 | Returns a pst of the pnes in the element, breaking at the pne boundaries |
10 | Returns a copy with the leading and traipng characters removed |
11 | Returns a string which is the concatenation of the strings in the sequence |
12 | Returns a copy of the string with all occurrences of substring replaced by the new string |
13 | Calls str.decode element-wise |
14 | Calls str.encode element-wise |
These functions are defined in character array class (numpy.char). The older Numarray package contained chararray class. The above functions in numpy.char class are useful in performing vectorized string operations.
Advertisements