Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

how to change a row of numbers to a column of numbers in a .csv file

 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the moment I have a .csv file

When I look at it it looks like this
1 3 8 4 2 5 4

I would like to change it to
1
3
8
4
2
5
4

How do I do that ?

Bob M
 
Rancher
Posts: 3599
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Marshal
Posts: 25452
65
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although... neither what you see now and what you want to see are in CSV format. It's hard to be "Comma Separated" if you don't have any commas.
 
Bob Matthews
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Paul: there are many confusing aspects of the dl4j example I am looking at

And your comment is just one of them

details of the example -

https://archive.ics.uci.edu/ml/datasets/Synthetic+Control+Chart+Time+Series

the example produces a huge number of .csv files - none of which are comma separated ???

The example appears to me (a novice) as highly inefficient in its methods of handling data

Bob M
 
Bartender
Posts: 7077
65
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The definition of ".csv" files has been watered down to a more generic "delimited" file format where the delimiter need not be a comma but may be some other character(s).
 
Marshal
Posts: 68917
275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Scanner likes space‑delimited text, since that matches its default delimiter. It is easy enough to change that delimiter.
 
and POOF! You're gone! But look, this tiny ad is still here:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic