Python | Pandas series.str.get()
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. ***Pandas ***is one of those packages and makes importing and analyzing data much easier.
Pandas str.get() method is used to get element** at the passed position.** This method works for string, numeric values and even lists throughout the series. **.str **has to be prefixed every time to differentiate it from Python’s default get() method.
**Syntax: **Series.str.get(i)
**Parameters: **
**i : **Position of element to be extracted, Integer values only.
**Return type: **Series with element/character at passed position
To download the CSV used in code, click here.
In the following examples, the data frame used contains data of some NBA players. The image of data frame before any operations is attached below.