I have a csv file with particular data in certain locations.As for example
20,3678863,Y,Sinha,Varun,51400195, 051-40-0195,7/19/1947
3237.14,4656311,Y ,Goswami,Nabajyoti,77502793,077-50-2793,5/5/1962
I have 1000+ lines of data.
I want to extract the second and fourth data in a particular row and put it in a hash map.
My next task will be to use the second value of each record and search it in some text file.
Please help me to extract data into a hash map. so that I can continue with the rest...
Any help is really appreciated. Thanks
1 2650
If your data itself does not contain commas, use split to grab the 2nd/4th columns:
Otherwise, search CPAN for an appropriate CSV/xSV module.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Meenakshi Matai |
last post by:
I am trying to read data from a .dat file using fread.
This is how my syntax looks:
temp = fread(indata, sizeof(short int), 1, datafile);
I looked into the data file in Hex format and saw that...
|
by: Johnny Google |
last post by:
Here is an example of the type of data from a file I will have:
Apple,4322,3435,4653,6543,4652
Banana,6934,5423,6753,6531
Carrot,3454,4534,3434,1111,9120,5453
Cheese,4411,5522,6622,6641
The...
|
by: Neil West |
last post by:
I’m trying to drag & drop listview items between two instances of my app. The
actual data that’s passed in DoDragDrop is an arraylist that’s been
serialized to a memorystream. The contents...
|
by: Eduardo Pérez Ureta |
last post by:
I was wondering what the best way is to store a file hash (MD5 or SHA1)
and make it primary key indexed.
I have seen some people storing the hexadecimal encoded MD5 in a
CHAR(32) but it may be a...
|
by: News |
last post by:
Hi everyone,
My goal is to pull command switches/options from a file and then assign
the values to select variables which would eventually be included in a
class object.
The data file looks...
|
by: John Wright |
last post by:
I want to create a file hash on my exe files and store the hash signature in
a database so I can retrieve the value to compare the file hash to ensure I
have an untampered file. How can this be...
|
by: caine |
last post by:
I want to extract web data from a news feed page
http://everling.nierchi.net/mmubulletins.php.
Just want to extract necessary info between open n closing tags of
<title>, <categoryand <link>....
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
I have a question for you.
I have a .csv file which has many lines of data.
Each line has many data fields which are delimited by ",".
Now I need to extract part of data from this...
|
by: CSharper |
last post by:
I have a data file which is 2.1GB (zipped), when the exe runs, it
copies the content of the zip file to a destination folder. What is
the best way to achive this? Current implementation is to zip...
|
by: sivadhanekula |
last post by:
Hi everyone,
I have a problem with my Mysql data. I have 2,95,67,456 lines of data which is too much and if I run this in MYSQL front-end it is telling "OUT OF MEMORY". Any way with my collegues...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |