import pandas as pd # Dictionary of string and int char_dict = { 'C': 56, "A": 23, 'D': 43, 'E': 78, 'B': 11 } # Convert a dictionary to a Pandas Series object. # dict keys will be index of Series & # values of dict will become values in Series. series_obj = pd.Series(char_dict) print('Contents of Pandas Series: ') print(series_obj)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter