# Construct a DataFrame in Pandas using string data in Python # importing pandas as pdimport pandas as pd  # import the StrinIO function# from io modulefrom io import StringIO  # wrap the string data in StringIO functionStringData = StringIO("""Date;Event;Cost    10/2/2011;Music;10000    11/2/2011;Poetry;12000    12/2/2011;Theatre;5000    13/2/2011;Comedy;8000    """)  # let's read the data using the Pandas# read_csv() functiondf = pd.read_csv(StringData, sep =";")  # Print the dataframeprint(df)