Re: Reading 'scientific' csv using Pandas?

2018-11-20 Thread Martin Schöön
Den 2018-11-19 skrev Martin Schöön : > I spoke too early. Upon closer inspection I get the first column with > decimal '.' and the rest with decimal ','. I have tried the converter > thing to no avail :-( > Problem solved! This morning I woke up with the idea of testing if all this fuss may be

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Thomas Jollans
On 2018-11-18 19:22, Martin Schöön wrote: > Den 2018-11-18 skrev Shakti Kumar : >> On Sun, 18 Nov 2018 at 18:18, Martin Schöön wrote: >>> >>> Now I hit a bump in the road when some of the data is not in plain >>> decimal notation (xxx,xx) but in 'scientific' (xx,xxxe-xx) notation. >>> >> >>

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread MRAB
On 2018-11-19 20:44, Martin Schöön wrote: Too many files to go through them with an editor :-( If only Python could read and write files... :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread MRAB
On 2018-11-19 21:32, Martin Schöön wrote: Den 2018-11-19 skrev Martin Schöön : Den 2018-11-19 skrev Peter Otten <__pete...@web.de>: The engine="python" produces an exception over here: """ ValueError: The 'decimal' option is not supported with the 'python' engine """ Maybe you can try and

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-19 skrev Martin Schöön : > Den 2018-11-19 skrev Peter Otten <__pete...@web.de>: >> >> The engine="python" produces an exception over here: >> >> """ >> ValueError: The 'decimal' option is not supported with the 'python' engine >> """ >> >> Maybe you can try and omit that option? > >

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-19 skrev Peter Otten <__pete...@web.de>: > Martin Schöön wrote: > >> My pandas is up to date. >> > > The engine="python" produces an exception over here: > > """ > ValueError: The 'decimal' option is not supported with the 'python' engine > """ > > Maybe you can try and omit that

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Too many files to go through them with an editor :-( /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Chris Angelico
On Tue, Nov 20, 2018 at 7:46 AM Martin Schöön wrote: > Thanks, I just tried this. The line locale.setlocale... throws an > error: > > "locale.Error: unsupported locale setting" > > Trying other ideas instead of 'de' results in more of the same. > '' results in no errors. Haven't been reading in

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Martin Schöön
Den 2018-11-18 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= writes: >>to read from such files. This works so so. 'Common floats' (3,1415 etc) >>works just fine but 'scientific' stuff (1,6023e23) does not work. > > main.py > > import sys > import pandas > import locale > print(

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Peter Otten
Martin Schöön wrote: > My pandas is up to date. > > In your example you use the US convention of using "." for decimals > and "," to separate data. This works perfect for me too. > > However, my data files use European conventions: decimal "," and TAB > to separate data: > > col1 col2 > 1,1

Re: Reading 'scientific' csv using Pandas?

2018-11-19 Thread Shakti Kumar
Hi Martin, On Sun, 18 Nov 2018 at 23:59, Martin Schöön wrote: > > Den 2018-11-18 skrev Shakti Kumar : > > On Sun, 18 Nov 2018 at 18:18, Martin Schöön wrote: > >> > >> Now I hit a bump in the road when some of the data is not in plain > >> decimal notation (xxx,xx) but in 'scientific'

Re: Reading 'scientific' csv using Pandas?

2018-11-18 Thread Martin Schöön
Den 2018-11-18 skrev Shakti Kumar : > On Sun, 18 Nov 2018 at 18:18, Martin Schöön wrote: >> >> Now I hit a bump in the road when some of the data is not in plain >> decimal notation (xxx,xx) but in 'scientific' (xx,xxxe-xx) notation. >> > > Martin, I believe this should be done by pandas itself

Re: Reading 'scientific' csv using Pandas?

2018-11-18 Thread Shakti Kumar
On Sun, 18 Nov 2018 at 18:18, Martin Schöön wrote: > > I am in this project where I try to get an overview of a bunch of > computer generated (finite element program) data. I have it stored in a > number of csv files. > > Reading the data into spreadsheet programs works fine but is very labour >

Reading 'scientific' csv using Pandas?

2018-11-18 Thread Martin Schöön
I am in this project where I try to get an overview of a bunch of computer generated (finite element program) data. I have it stored in a number of csv files. Reading the data into spreadsheet programs works fine but is very labour intensive so I am working with Pandas in Jupyter notebooks which