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

    May 15, 2016 · Closed 3 years ago. I'm using Spyder for Python 2.7 on Windows 8. I'm trying to open and read a csv file and see all the data stored in it, but this is what I get instead:

  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

    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 stored in …

  4. 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

  5. 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)

  6. python - Read CSV or Excel - Stack Overflow

    I'm allowing users to upload a CSV or Excel file. I'm using pandas to read the file and create a dataframe. Since I can't predict which filetype the user will upload, I wrapped pd.read_csv() and pd.

  7. Reading a file using a relative path in a Python project

    Say I have a Python project that is structured as follows: project /data test.csv /package __init__.py module.py main.py __init__.py: from .module import test ...

  8. How to read a csv file from an s3 bucket using Pandas in Python

    Jun 13, 2015 · Pandas (starting with version 1.2.0) supports the ability to read and write files stored in S3 using the s3fs Python package. S3Fs is a Pythonic file interface to S3.

  9. How do I read a large csv file with pandas? - Stack Overflow

    Apr 26, 2017 · Is the file large due to repeated non-numeric data or unwanted columns? If so, you can sometimes see massive memory savings by reading in columns as categories and selecting required …

  10. python - UnicodeDecodeError when reading CSV file in Pandas - Stack ...

    read_csv takes an encoding option to deal with files in different formats. I mostly use read_csv('file', encoding = "ISO-8859-1"), or alternatively encoding = "utf-8" for reading, and generally utf-8 for …