About 1,060,000 results
Open links in new tab
  1. Import CSV file into Python - Stack Overflow

    I tried several times to import CSV file into python 2.7.15 but it fail. Please suggest how to import CSV in Python. Thank you

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

    36 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 …

  3. Importing a CSV file into a sqlite3 database table using Python

    May 22, 2010 · I have a CSV file and I want to bulk-import this file into my sqlite3 database using Python. the command is ".import .....". but it seems that it cannot work like this.

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

    Oct 7, 2017 · Closed 19 days ago. I have a line of code in a script that imports data from a text file with lots of spaces between values into an array for use later.

  5. python - How to load data from a .csv file without importing the .csv ...

    Sep 1, 2015 · 6 Lets say you have the data in t.csv. You can hold the data in a results list, then use split on each line in the file and append the results of your split to results. Using the csv module would …

  6. python - How to keep leading zeros in a column when reading CSV …

    96 I am importing study data into a Pandas data frame using read_csv. My subject codes are 6 numbers coding, among others, the day of birth. For some of my subjects this results in a code with a leading …

  7. How to import data from a CSV file and store it in a variable?

    May 28, 2014 · If you want to use Python 3 (as you state in the question) and to process the CSV file using the standard csv module, you should be careful about how to open the file.

  8. Importing csv from a subdirectory in Python - Stack Overflow

    Most of the resources I've dug up involve importing a module or package from a subdirectory rather than a basic data file. The line of code that imports my csv currently looks like:

  9. How do I read in a CSV file from my desktop in Python?

    Mar 5, 2021 · I am trying to read in a CSV file from my desktop: My code is as follows: import pandas as pd import csv from pathlib import Path csv = r'C:\Users\nulli\OneDrive\Desktop\Work_Sample.csv' df …

  10. python - Creating a dictionary from a csv file? - Stack Overflow

    I am trying to create a dictionary from a csv file. The first column of the csv file contains unique keys and the second column contains values. Each row of the csv file represents a unique key, va...