<jupyter_start><jupyter_text>Input/outputIn this lecture, you will see how we can import different type of the datastructures.<jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>1. CSV<jupyter_code>csv_data = pd.read_csv('data.csv'  ) 
csv_data
# Writing the csv
csv_data.to_csv('myfile_saved.csv', index=False )<jupyter_output><empty_output><jupyter_text>2. Excel<jupyter_code># This will read it in as a dataframe
excel_data = pd.read_excel('data.xlsx', sheetname='data')

# Saving to an excel file from a dataframe:
excel_data.to_excel('New_excel_sheet.xlsx')<jupyter_output><empty_output><jupyter_text>3. HTML<jupyter_code>url = 'http://www.fdic.gov/bank/individual/failed/banklist.html'
html_data = pd.read_html(url)
html_data<jupyter_output><empty_output><jupyter_text>Json<jupyter_code>json_data = pd.read_json('json_data.json')
json_data<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12, 'fraction_numerical': 0.0033333333333333335, 'mean_word_length': 8.901098901098901, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '311293', 'license': 'MIT', 'n_tokens_mistral': 363, 'n_tokens_neox': 354, 'n_words': 55, 'path': 'Section 4/06 Data Input and Output.ipynb', 'repo_name': 'PacktPublishing/Migrating-from-R-to-Python-for-Data-Analysis', 'size': '900'}