Loading Data From csv json Excel Text Using Python

Loading Data From csv json Excel Text Using Python

 

Loading Data From csv json Excel Text Using Python .

In this Article i will show you how to load

  1. CSV
  2. Excel
  3. Json
  4. Text

Using Python

In order to do that i will use the Tool below to load the files listed above

  1. Jupyter  click here
  2. Command Prompt

Before we get Started lets Install Jupyter using PIP Install

Step 1

  1. Open Command Prompt
  2. Navigate to the Directory where your Pip was installed
  3. Type ” Pip Install Jupyter “
  4. Wait for the Installation to complete

Step 2

  1. Open Jupyter in Command Prompt by typing  ” jupyter notebook”
  2. A new Jupyter Interface will open at your Chrome Browser
  3. Goto New and click “Python 3”

 

Step 3( Start Importing CSV Files )

 

If you use the {\} for your File Directory , you will get the Error below

 File "<ipython-input-15-b2e8e1c1d51b>", line 1
    df1=pandas.read_csv("C:\Users\User\sampledata\anyfile.csv")
                       ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Step 4( Start Importing Json Files )

Step 5( Start Importing Text  Files using  {,} as a seperator )

Step 5( Start Importing Text  Files using  {;} as a seperator )

 

Check out also Searching content in file using Python here

Leave a Comment

5 × 3 =