# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Data Input and Output
#
# Reading DataFrames from external sources using pd.read functions

import numpy as np
import pandas as pd

# ## CSV
#
# ### CSV Input

dataframe = pd.read_csv('train.csv')

# ### CSV Output

dataframe.to_csv('train2.csv',index=False)    #If index=FALSE then csv does not store index values

# ## Excel
#
# Using Pandas, one can read excel files, however it can only import data. It does not fetch formulae or any formatting/images/macros and having such things in excel files can crash the python function to crash and not execute successfully.

# ### Excel Input

pd.read_excel('Consumer.xlsx',sheet_name='Data1')

# ### Excel Output

dataframe.to_excel('Consumer2.xlsx',sheet_name='Sheet1')

# ### The END

StarcoderdataJupyterScriptsDedupFiltered