I would like to know any advice for creating a program that will read in a *.csv file and load the data into a 24 x 24 array for further processing. I am including a total of 48 records, so that you can see how the data looks and what I'll be working with. [CODE] 1.000000,0.767801,0.370782,1.887500,0.817261,0.120824,0.178702,1.329200,0.128401,0.022936,0.009620,0.263158,0.088230,0.702998,0.160940,0.607977,0.169635,0.000956,0.009970,0.147252,0.856678,0.031328,0.025595,0.000522 1.302420,1.000000,0.482914,2.458320,1.064420,0.157364,0.232745,1.731180,0.167232,0.029872,0.012529,0.342742,0.114913,0.915598,0.209611,0.791841,0.220936,0.001245,0.012985,0.191783,1.115750,0.040803,0.033336,0.000680[/CODE]

Member Avatar
Member Avatar
+0 forum 15

I am at my wits end. I have written this query which is aimed at importing my csv data uinto mysql table 'refs' load data local infile '/home/amaina/Documents/march2016.csv' into table refs fields terminated by ',' enclosed by '"' escaped by '' lines terminated by '\n' ignore 1 rows; My pain is that whenever i run this query i get the following results: **Query OK, 0 rows affected, 33 warnings (0.00 sec) Records: 11 Deleted: 0 Skipped: 11 Warnings: 33** The CSV file looks something like this (attached) i changed it to .txt for it to be uploaded What can be …

Member Avatar
Member Avatar
+0 forum 7

ID Arrival Departure ArrivalDate DepatureDate 1001 New York Holland 2009-09-23 2012-07-23 1301 Florida Germany 2010-10-23 2012-10-11 1401 New York Holland 2009-09-23 2009-09-25 1301 New York Beijing 2009-09-23 2010-09-21 1201 New York Holland 2008-01-01 2009-09-23 1001 Virginia New York 2008-01-01 2009-09-22 1021 New York Holland 2009-09-23 2009-09-25 1001 New York Holland 2009-09-24 2012-07-23 1021 New York Holland 2009-09-26 2012-07-23 1001 New York Holland 2009-09-25 2012-07-23 ….... …......... …........ ….............. …................ 1001 New York Holland 2012-07-23 2012-07-23 1401 New York Holland 2009-09-25 2009-09-25 1301 New York Beijing 2010-09-21 2010-09-21 1201 New York Holland 2009-09-23 2009-09-23 1001 Virginia New York 2009-09-22 2009-09-22 1021 …

Member Avatar
Member Avatar
+0 forum 3

Hello all, I have a function in JS, that I need to translate in Java to be used in my JSP as part of server side script. I need to find out what's the equavalent of JSON.stringify() in Java? This is my current JS function. This functioin takes a CSV file as input, that has tab separated columns, and converts it inot JSON file. But, now the requiremnet is that the CSV files are located on the server, and I can't use JS. I need to use server side scripting to handle this request, either at my JSP level using …

Member Avatar
Member Avatar
+0 forum 1

I am currently attempting to work on converting a fairly sizeable JSON object and convert it into a CSV format. However, when I attempt to do so, using a conventional approach (that seems to work with other files). I am presented with a "ValueError: too many values to unpack" I have tried to flatten the JSON object using this function: # def flatten(d, parent_key=''): # items = [] # for k, v in d.items(): # try: # items.extend(flatten(v, '%s%s_' % (parent_key, k)).items()) # except AttributeError: # items.append(('%s%s' % (parent_key, k), v)) # return dict(items) However this concatenates the keys. I …

Member Avatar
Member Avatar
+0 forum 68

Good Afternoon: I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is there a best practice for working with this? Ideally I would like to recursively iterate through the key value pairs. Thank you in advance. I am using Python 3.4 on Windows. My editor is Sublime 2. I originally parsed this from an XML file. { "Fee": { "A": "5", "FEC": "1/1/0001 12:00:00 AM", "TE": null, "Locator": null, "Message": "Transfer …

Member Avatar
Member Avatar
+0 forum 13

Here's dish. When I submit a form, it straight up crashes my site on my network. Here are the details. 1. The form submits to itself. The form is on site.php (fictional name for reference on this post) and the action= "site.php". 2. When it crashes, it crashes for every page on my site I try to visit. Other sites work. And it's only on my network. While it's in crash mode, others on different networks can visit the site. ANd it doesn't fully crash on my mobile network. Just for site.php. 3. I have to fully reboot the modem …

Member Avatar
Member Avatar
+0 forum 1

I need to process a CSV file and create a new CSV file. In order to get a proof of concept, I placed the CSV on the server and was able to process it fine. Then I setup a form in order to allow the client to upload the file. I don't even want to store the file on my server, just have the user submit it via the form, process it and provide the new file for download. The problem I am running into is when I run the $_FILES["file1"] through my function, I get this error "Fatal error: …

Member Avatar
Member Avatar
+0 forum 6

I have the folling code which imports my CSV file into the respective columbs on my datagridview I would like to clean the string by removing any " from the string before populating the datagridview. can anyone point me in the right direction please? Dim newstring As String = Nothing Dim sr As New IO.StreamReader("c:\vectacus.csv") Dim dt As New DataTable Dim newline() As String = sr.ReadLine.Split(","c) dt.Columns.AddRange({New DataColumn(newline(0)), _ New DataColumn(newline(1)), New DataColumn(newline(2)), New DataColumn(newline(3)), New DataColumn(newline(4)), New DataColumn(newline(5)), New DataColumn(newline(6)), New DataColumn(newline(7)), New DataColumn(newline(8)), New DataColumn(newline(9)), New DataColumn(newline(10))}) While (Not sr.EndOfStream) newline = sr.ReadLine.Split(","c) Dim newrow As DataRow = …

Member Avatar
Member Avatar
+0 forum 1

hello i need to replace data only in one(specific ) column of csv file for example replace just in city column f_name,l_name ,city,country --->headers david,d,los-ang''elses,california ( replace los-ang''elses to los-ang'elses) ''-->' g''armin ,dsdsd,new-york,sdasdas my code is replace all the data in file , but i need to replace specific column : pls help me :-) Encoding encode = System.Text.Encoding.Default; /// Encoding encode = System.Text.Encoding.GetEncoding(1252); ///StreamReader reader = new StreamReader(filePath, encode); StreamReader reader = new StreamReader(clsStatVar.inputFile, encode); string content = reader.ReadToEnd(); reader.Close(); ///content = Regex.Replace(content, searchText, replaceText); ///content = Regex.Replace(content, @"""", " "); ///content= Regex.Replace(content, ".", " "); /// string[] BadCharacters …

Member Avatar
Member Avatar
+0 forum 3

The End.