csv

csv viewer on windows environement for 10MM lines file

We a need a csv viewer which can look at 10MM-15MM rows on a windows environment and each column can have some filtering capability (some regex or text searching) is fine. ...

How to create csv file using servlet ?

I want to download csv file from servlet.Data comes from Object[] obj=search.getSearch(); I have data the object[], i need to write into csv and download. Could you help me how to do in servlet class? ...

How to display the records as columns ?

Hi, I have created the csv file.The records are displaying row order.but i need coloumn order. how to modify the code ? for(int i = 0;i < maps.length;i++) { Map<String, String> map = (Map<String, String>)maps[i]; sep = ""; for(int j = 0;j < labels.length;j++) { String val = map.get(labels[i]); out.wri...

csv in Python adding extra carriage return

In Python 2.7 running on WinXPpro: import csv outfile = file('test.csv','w') writer = csv.writer(outfile,delimiter=',',quoting=csv.QUOTE_MINIMAL) writer.writerow(['hi','dude']) writer.writerow(['hi2','dude2']) outfile.close() Generates a test.csv file with an extra \r at each row, like so: test.csv hi,dude\r\r\nhi2,dude2\r\r\n ins...

How to print all values of an array in perl

I am trying to do print all of the values of an array from a CSV file. I am sort of manually doing this in the example below. Can someone show me the code for doing this for all of the fields of the array no matter how many fields there are? I'm basically just trying to print each field on a new line. #!/usr/bin/perl use strict; use ...

Is there a quick way to convert an entity to .csv file?

at present, I have: string outputRow = string.Empty; foreach (var entityObject in entityObjects) { outputRow = entityObject.field1 + "," + entityObject.Field2 etc.... } I'm still new to the Entity Framework, is there a quicker way? ...

Generate Excel using php, format cells as string number etc

I am generating an excel file using php. The file gets created how ever strings with leading zeros example 0234 get converted to 234. ...

to merge two columns in a csv file

merge two columns in a csv file ...

merging 2 columns in a csv file through python

Possible Duplicate: to merge two columns in a csv file i need to take 2 different columns in the csv file... say col[4] and col[13]... i want to merge the data in these 2 columns into a single column (and i need to insert a dot between these 2 strings) and then copy it to a different csv file.... how do i implement this in pyt...

What can be the maximum size for the $_SESSION ?

I am importing a csv file with more then 5,000 records in it. What i am currently doing is, getting all file content as an array and saving them to the database one by one. But in case of script failure, the whole process will run again and if i start checking the them again one by one form database it will use lots of queries, so i thou...

using DictWriter in Python to write a subset of a dictionary's keys

I wrote a function that serializes a list of dictionaries as a CSV file using the CSV module. I sometimes want to write out to a file only a subset of each dictionary's keys however. I use the following code: def dictlist2file(dictrows, filename, fieldnames, delimiter='\t', lineterminator='\n'): out_f = open(filename, 'w') ...

to extract specific columns from a csv file and copy it to another using python

i have a csv file which is actually a matrix of 0's and 1's i need exclude those columns that have 0's and pick only those that have 1's and copy them to another csv file... using python.... i tried this: reader=csv.DictReader(open("test1.csv","r"),[]) for data in reader: if data==1: print data please ...

append a particular column from a csv file to another using python

hi, I'll explain my whole problem: I have 2 csv files: project-table.csv (has about 50 columns) interaction-matrix.csv (has about 45 columns) I want to append the string in col[43] from project-table.csv with string in col[1] of interaction-matrix.csv with a dot(.) in between both the strings next, interaction-matrix.csv has...

subscripting a specific line from python's csv reader?

i'd like to be able to access specific lines of a csv file through the csv reader. For example, the fourth line. Is there a way to do this with python's csv reader module? ...

Python: No csv.close()??

I'm using the CSV module to read a tab delimited file. Code below: z = csv.reader(open('/home/rv/ncbi-blast-2.2.23+/db/output.blast'), delimiter='\t') But when I add Z.close() to end of my script i get and error stating "csv.reader' object has no attribute 'close'" z.close() So how do i close "Z"? ...

Need more examples on how to use Spreadsheet::ParseExcel

I have been using the Spreadsheet::ParseExcel to list the contents of spreadsheet. I've seen several examples on how to dump the entire spreadsheet. I really would like to see how to use this script more selectively. The example below from IBM basically dumps the content of all cells that have data. #!/usr/bin/perl -w use strict;...

whats the best way to parser csv using python ?

I need to develop a script, with input csv file, this file contains multiple headers [headers are language(fr,en,...) specific] and between headers there will be specific data - you can say we've have a well defined CSV template, which will be parsed and will be converted to a specific pydict-dictionary and then this dictionary will be ...

What's the best way to dump a MYSQL table to CSV?

Possible Duplicate: Dump a mysql database to a plaintext (CSV) backup from the command line. I prefer python, but if mysqldump works...then how can I do that? ...

How to create CVS file out of DB dataset using C#?

How do i quickly create CVS (Comma Delimited File Excel) file from DB sp? I just load values with comma and what do i need to do with new line "\n" or what? Maybe there is method of Dataset to convert to CVS like ie. to XML ? thanks ...

csv file column reading and extracting using python

i have the following code... reader=csv.DictReader(open("test1.csv","r")) allrows = list(reader) keepcols = [c for c in allrows[0] if all(r[c] != '0' for r in allrows)] print keepcols writer=csv.DictWriter(open("output1.csv","w"),fieldnames='keepcols',extrasaction='ignore') writer.writerows(allrows) i have a csv file which has about...