![]() |
VOOZH | about |
In this article, we will discuss how to convert a Pandas series to a Python List and it's type. This can be done using the tolist() method.
Example 1:
Output:
👁 Pandas series to listIn the above example, we are passing Panda series data as evenNumbers . As index is not given, by default 0 is taken
Example 2:
Output:
👁 Pandas series to listIn the above example, we are passing Panda series data as np.array(['ant','bat','cat','dog']). Index as [100,101,102,103]
Example 3:
Output:
👁 Pandas series to list
Example 4: