Output:
In this example, we created a Series object `my_series` from a Python list `my_list`. Example 2: Modifying a Seriespython
Output:apple 3 banana 3 orange 4 kiwi 5 dtype: int64 ``` In this example, we created a Series object `my_series` from a Python dictionary `my_dict`. We then added a new key-value pair (`'kiwi': 5`) to the Series, and updated an existing key-value pair (`'banana': 2` to `'banana': 3`). These examples use the pandas.core.api package library, which is one of the core modules of pandas that provides the most commonly used functions and classes of the library. The use of `pd.Series()` indicates the use of pandas for the creation of Series object.