Python Forum
python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: python (/thread-15577.html)



python - salahoum - Jan-22-2019

I'm trying to read a csv file in python
but not just display it but from the manager as a table
I found a lot of video that read csv file but only figures next to each other
I found some video that talks about Panda Panda and Anaconda and I did not understand the difference between the normal python and the two
and how i can display a table that contains values extait since csv


RE: python - snippsat - Jan-22-2019

(Jan-22-2019, 09:16 PM)salahoum Wrote: I found some video that talks about Panda Panda and Anaconda and I did not understand the difference between the normal python and the two
and how i can display a table that contains values extait since csv
Anaconda as i have i tutorial about here,comes with a lot packages installed which can make it easier for new users to get started.
So Anaconda is still Python,but with a lot of Packages pre-installed.
With Python(python.org) have to install packages like pandas,jupyter Notebook...ect.

Jupyter Notebook and pandas make it look better,if want to display cvs in table format.
[Image: RByJNX.jpg]
Read it with csv module eg in a editor then it look like in file.
import csv

with open('example.csv', newline='') as csvfile:
    reader = csv.reader(csvfile, delimiter=',')
    for row in reader:
        print(','.join(row))
Output:
Sally Whittaker,2018,McCarren House,312,3.75 Belinda Jameson,2017,Cushing House,148,3.52 Jeff Smith,2018,Prescott House,17-D,3.20 Sandy Allen,2019,Oliver House,108,3.48