Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:22:25+00:00 2026-05-30T22:22:25+00:00

I have more than 10GB .csv files. I m trying to import the data

  • 0

I have more than 10GB .csv files. I m trying to import the data from these files into MySQL using python. Since csv files are comma separated files, and I have data which itself contains commas, therefore I can not use ‘,’ here for splitting. There please suggest some other option
for splitting the csv file.
I want to import the data from the csv file(where the data itself contains comma) to MySQL (i am using Wamp server for the same).
I have data like ‘london, u.k.’, ‘2010’, ‘credit, saving’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:22:26+00:00Added an answer on May 30, 2026 at 10:22 pm

    First of all, I am assuming that the CSV files have quotes around the string values.

    Thus each value containing a comma is surrounded by a quote like this:

    a, b, 2, ‘foo, bar’

    If so, then you can use the following:

    import

     csv
    
    quoteChar = "'"
    
    myReader = csv.reader(open('largefile.csv', 'rb'), delimiter=',', quoteChar = quoteChar)
    
    for row in myReader:
        print row # this prints a list. Row is a list of values per line in your
        # 'largefile.csv' file. Each row is splitted on the delimiter char.
        # (comma in this case) and strings that are quoted by quoteChar (in your case
        # a ' are treated differently.) This will work for your input that you've given
        # in your question.
    
    # this is what you used to do:
    for line in open('largefile.csv', 'rb'):
         row = line.split(quoteChar)
    

    If otherwise it’ll depend on how your CSV files look like.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very large files (more than 10Gb). I need only some lines from
Is it possible to have more than one data type within an array list,
If we can have more than one .config files, we can share one config
In my place where I work, used to have files with more than million
We have more than 1 instances of a certain exe running from different locations.
i expect to have more than one million files with unique names. I have
I have more than a thousand of polygons loaded into my map and I
I have more than 50,000 rows of data in Excel that look like this:
I'll have more than one of these small boxes on my site, and each
i have more than 1000 files and want to replace a special text in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.