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 7992495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:34:45+00:00 2026-06-04T13:34:45+00:00

I am building an app which reads the data from the CSV file and

  • 0

I am building an app which reads the data from the CSV file and stores those data into the database. I csv file which I get from the 3rd party consists of header in the first row which has to be deleted before pushing those data in to the database. How do I delete the first row pro grammatically and then push only the values or data to the database.I am using ruby 1.9.2 version, so I dont have to use “fastercsv”. I am using the standard CSV library.

Kindly help me out

  • 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-06-04T13:34:47+00:00Added an answer on June 4, 2026 at 1:34 pm

    You can fetch all the rows at once by using:

    arr_of_arrs = CSV.read("path/to/file.csv")
    

    And then you can use arr_of_arrs.drop(1) to remove header.
    Or you can use arr_of_arrs.each_with_index to skip the first row (header), like this:

    arr_of_arrs.each_with_index do |e, i|
      next if i == 0
    
      #process each row here
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty straightforward question. I'm building an app which reads data from a SQL Server
So, the thing is. I'm building my first rails app which reads images from
I'm building a Rails app which creates a bookmarklet file for each user upon
I am building an iphone app which allows people to update an xml file
I am building an app with complex data which I use arrays for. Some
I´m building an asp.net app, which technology I should use to get AJAX capabilities?
I'm using a sqlite3 database to store app's data. Instead of building a database
I am building an app for which I might have to read content from
I am building an app for which I need to set up cron jobs.
I'm building an AJAX app which animates in content dynamically. Since all links are

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.