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

  • SEARCH
  • Home
  • 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 5957703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:26:21+00:00 2026-05-22T18:26:21+00:00

I have two type of csv’s having data like: Format 1 read from csv

  • 0

I have two type of csv’s having data like:

Format 1 read from csv created from spreadsheet having two coloums.

datas = [[u'Woeoe;"ww@w.com"'], [u'wqqq;"Ww2@2.com"'], [u'Asasasa;"122@22.co.in"']]

format 2 read from the csv created from text editor save as .csv and having data like

fname lname,email@email.com
fname1 lname2 ,email@email1.com
datas = [[u'Vaada sasoe ', u'ssdoe@d.com'], [u'skdod asksd ', u'shashias@ssdsd.com']]

i have read those files with csv reader:

reader = csv.reader(input, quotechar='"', delimiter=',')
datas = []
for line in reader:
    datas.append(line)

how do i handle those two different format output of csv reader ? is their any way that i can convert the data while reading in to one simple comma separated format like format2 mention above if i input the any type of csv ? basically i want to data read should be in always in format2.

  • 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-22T18:26:21+00:00Added an answer on May 22, 2026 at 6:26 pm

    The first file use “;” as delimiter. So, you just have to say it to the reader.

    Try to read the first file with csv.reader(input, quotechar='"', delimiter=';')

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

Sidebar

Related Questions

I have to read a binary file. I have to read two type of
I am having web site in ASP.NET. We have two type of login 1.
I want to merge two CSV files that I have read into python using
I have two type of file. One of them is ASCII file and data
I have two .csv files containing correlation matrices exported from R. One file contains
I have two expressions of type Expression<Func<T, bool>> and I want to take to
I have two maps of type Map<Long, Integer>, one named oldValues representing the old
I have two entities types: RunContainer parent entity type Run child entity type Run
I have two tables like of this structure: content (content_id, content_type, user_id, time, comment_count)
if I have two classes, and have defined an explicit type conversion between them,

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.