Could someone provide the best way to read xls files with python (not csv files).
if there a built in package which supported by default with python to this this task ?
How would i go about creating an application for my web page that can extract data from my database (i currently get the data in a CSV file). id also like the user to be able to filter the data by certain parameters. can u help
I'm reading a text file via CGI in, in perl, and noticing that when the file is saved in mac's textEdit the line separator is recognized, but when I upload a CSV that is exported straight from excel, they are not. I'm guessing it's a \n vs. \r issue, but it got me thinking that I don't know how to specify what I would like the line terminator token to be, if I didn't want the one it's looking for by default.
Hello,
I am trying to insert data into a mysql table from a csv file. I am using the infile sql command, but I am having trouble because the first column of the table is an id that is set as an auto increment field. what do I have to set my first column value to in order to get this to work, or can I do it at all?
Thanks
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/Perl/Python or any other scripting language.
I have a table with 600+ columns imported from a csv with special chars % _ - in the column names, is there a way to change the column names to remove these special chars ?
the code can be tsql or tsql
The PHP's crc32 support string as input.And For a file , below code will work OFC.
crc32(file_get_contents("myfile.CSV"));
But if file goes huge (2 GB) it might raise out of memory Fatal error.
So any way around to find checksum of huge files ?
I have the following code:
ifstream initFile;
initFile.open("D:\\InitTLM.csv");
if(initFile.is_open())
{
// Process file
}
The file is not opening. The file does exist on the D: drive. Is there a way to find out exactly why this file cannot be found? Like an "errno"?
How would i go about creating a php application for my web page that can extract data from my database (i currently get the data in a CSV file). id also like the user to be able to filter the data by certain parameters. can u help
I have a situation where I need to extract dates from the file names whose general pattern is [filename_]YYYYMMDD[.fileExtension]
e.g. "xxx_20100326.xls" or x2v_20100326.csv
The below program does the work
//Number of charecter in the substring is set to 8
//since the length of YYYYMMDD is 8
public static string ExtractDatesFromFileNames(string fileName)
{
return fileName.Substring(fileName.IndexOf("_") + 1, 8);
}
Is there any better option of achieving the same?
I am basically looking for standard practice.
I am using C#3.0 and dotnet framework 3.5
Thanks
Hi,
Does anyone know any good resource where example (real) data can be downloaded for experimenting statistics and machine learning techniques such as decision trees etc?
Currently I am studying machine learning techniques and it would be very helpful to have real data for evaluating the accuracy of various tools.
If anyone knows any good resource (perhaps csv, xls files or any other format) I would be very thankful for a suggestion.
I'm a PHP noob.
I have a database that I will update weekly with a CSV. So far I've managed to upload the file to the server, open the file with PHP, and insert the data in my table.
Now I want to return the unique records that were added (on screen or in a file). How do I do this?
I'm trying to use fread/ifstream to read the first 2 bytes of a .csv with BOM info. But following code always skips the first two bytes (which are 'FF FE'):
ifstream is;
is.open (fn, ios::binary );
char buf[2];
is.read(buf, 2);
is.close();
using FILE*/fread does no better.
I use opencsv to parse csv files, and my code is
while( (line = reader.readNext()) != null ) { .... }
I got a compiler warning saying:
comparing values of types Unit and Null using `!=' will always yield true
[warn] while( (aLine = reader.readNext()) != null ) {
How should I do the while loop?
How do I use comma-separated-values recived from a URL query in Objective-c?
when I query the URL I get csv such as ("OMRUAH=X",20.741,"3/16/2010","1:52pm",20.7226,20.7594).
How do I capture and use this for my application?
In shell script,
I want to clear only text files and log files in the following structure with out removing the directory as well as subdirectories
|
|------bar/
|
|---file1.txt
|---file2.txt
|
|---subdir1/
| |---file1.log
| |---file2.log
|
|---subdir2/
|---image1.log
|---image2.log
I am using rm -rf /bar/* so I am getting the result as follows.
|------bar/
but I want the output like following
|
|------bar/
|
|
|
|
|---subdir1/
|
|
|
|---subdir2/
I want to remove only text files or log files or csv with out removing the directory and the subdirectories
I'm using the rowDiffs() command to calculate the step by step difference in 116 rows in a matrix.
I get the following error:
Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] :
non-numeric argument to binary operator
I have no idea why this is happening. I could take the diff() separately for each row and it would work.
Any ideas?
Here's the data:
https://dl.dropbox.com/u/22681355/data.csv
Code:
a=rowDiffs(data)
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/perl/python or any other scripting language.
Thanks!
I am looking for a way to monitor a Linux mbox email account, when an email arrives I would like to download an attachment from the email and save the attachment (CSV file) so that it may be used by a PHP script. What would be the best way of going about this? I have looked at PHP's IMAP functions but this does not appear to be the most appropriate method when a simple bash script may be all that is required?
Is there a way of joining results from 2 tables without using JOIN or SELECT from more than one table? The reason being the database im working with requires queries that only contain SELECT, FROM, and WHERE clauses containing only one distinct table. I do, however, need information from other tables for the project i'm working on.
More info: the querier returns the query results in a .csv format, is there something we can manipulate there?
I'm writing a program in C# that will need to store a few Data Tables on the user's computer and load them back when he restarts the program: Up to about 10000 records consisting of text and integers. I don't want to use a CSV file, and I had some trouble with SQLite. Are there any other good options to try?
Is it possible to deserialize (c#) a piece of xml, csv, json (whatever it is), and not know it's type? But be given back an object (which ultimately is the correct type)?
I've got a CSV file containing latitude and longitude values, such as:
"25°36'55.57""E","45°39'12.52""N"
Anyone have a quick and simple piece of C# code to convert this to double values?
Thanks