Implementation of Series Programs in Pandas
Let us implement the Series Programs in Pandas. First, create a Series in Pandas. Create a Series with different data types: #include the pandas library import pandas as pd #Create a series of elements sample = pd.Series([11, 22, 33, 44, 55, 66]) #Print the series print(sample) Output: 0 11 1 22 2 33 3 44 4 55 5 66 dtype: int64 Code to print the strings: #include the pandas library import pandas as pd # create a series and print the data sample = pd.Series(['Python','NumPy','Pandas']) print(sample) Output: 0 Python 1 NumPy 2 Pandas dtype: str Code to print the float values: import pandas as pd sample = pd.Series([3.14 ,4.5 , 6.7]) print(sample) Output: 0 3.14 1 ...