About 51 results
Open links in new tab
  1. How to read CSV file in Python? - Stack Overflow

    May 15, 2016 · As you can see, we can easily access different parts of the file by using our read_csv() function and creating a nested-list object. Finally, if you want to print to the entire file, you simply use …

  2. python - How do I read and write CSV files? - Stack Overflow

    The main csv module objects are the csv.reader and csv.writer objects. There are also dictionary wrapper objects - csv.DictReader and csv.DictWriter - which return and write dictionary formatted data.

  3. python - Import CSV file as a Pandas DataFrame - Stack Overflow

    Apr 2, 2017 · To read a CSV file as a pandas DataFrame, you'll need to use pd.read_csv, which has sep=',' as the default. But this isn't where the story ends; data exists in many different formats and is …

  4. Reading data from a CSV file in Python - Stack Overflow

    26 This question already has answers here: How do I read and write CSV files? (9 answers)

  5. Reading rows from a CSV file in Python - Stack Overflow

    Nov 17, 2012 · I have a CSV file, here is a sample of what it looks like: Year: Dec: Jan: 1 50 60 2 25 50 3 30 30 4 40 20 5 10 10 I know how to read the file in and print each

  6. python - How to import a csv-file into a data array? - Stack Overflow

    Oct 7, 2017 · You can use pandas library or numpy to read the CSV file. If your file is tab-separated then use '\t' in place of comma in both sep and delimiter arguments below.

  7. How can I read only the header column of a CSV file using Python?

    The problem with these is that each CSV file is 500MB+ in size, and it seems to be a gigantic waste to read in the entire file of each just to pull the header lines.

  8. python - Reading a huge .csv file - Stack Overflow

    I'm currently trying to read data from .csv files in Python 2.7 with up to 1 million rows, and 200 columns (files range from 100mb to 1.6gb). I can do this (very slowly) for the files with under 30...

  9. python - How to get rid of "Unnamed: 0" column in a pandas …

    pd.read_csv('file.csv') Unnamed: 0 A B C 0 0 1 2 3 1 1 4 5 6 2 2 7 8 9 This is very annoying! Does anyone have an idea on how to get rid of this?

  10. How to read one single line of csv data in Python?

    @MahsanNourani The file pointer can be moved to anywhere in the file, file.seek(0) will move it back to the start for example and then you can re-read from start. You'll have to keep the file open obviously …