Re: Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-23 Thread Piet van Oostrum
Markos writes: [...] >>> Please, any comments or tip? >> data = pd.read_csv ('table.csv', sep = ',', skiprows = 1, decimal=b',', >> skipinitialspace=True) >> > Thank you for the tip. > > I didn't realize that I could avoid formatting problems in the dataframe > or array simply by using the read_

Re: Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Markos
Em 22-09-2019 13:10, Piet van Oostrum escreveu: Markos writes: Hi, I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,280" 3, "0,152", "0,200", "0,280" I open as dataframe

Re: Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Richard Damon
On 9/22/19 7:05 PM, Markos wrote: > > Em 22-09-2019 13:10, Piet van Oostrum escreveu: >> Markos writes: >> >>> Hi, >>> >>> I have a table.csv file with the following structure: >>> >>> , Polyarene conc ,, mg L-1 ,,, >>> Spectrum, Py, Ace, Anth, >>> 1, "0,456", "0,120", "0,168" >>> 2, "0,456",

Re: Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Markos
Em 22-09-2019 13:10, Piet van Oostrum escreveu: Markos writes: Hi, I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,280" 3, "0,152", "0,200", "0,280" I open as dataframe wi

Re: Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Piet van Oostrum
Markos writes: > Hi, > > I have a table.csv file with the following structure: > > , Polyarene conc ,, mg L-1 ,,, > Spectrum, Py, Ace, Anth, > 1, "0,456", "0,120", "0,168" > 2, "0,456", "0,040", "0,280" > 3, "0,152", "0,200", "0,280" > > I open as dataframe with the command: > > data = pd.rea

Re: [Tutor] Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Eryk Sun
On 9/22/19, Albert-Jan Roskam wrote: > > Do you think it's a deliberate design choice that decimal and thousands > where used here as params, and not a 'locale' param? It seems nice to be > able to specify e.g. locale='dutch' and then all the right lc_numeric, > lc_monetary, lc_time where used. Or

Re: [Tutor] Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Cameron Simpson
On 22Sep2019 07:39, Albert-Jan Roskam wrote: On 22 Sep 2019 04:27, Cameron Simpson wrote: On 21Sep2019 20:42, Markos wrote: I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,2

Re: [Tutor] Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-22 Thread Albert-Jan Roskam
On 22 Sep 2019 04:27, Cameron Simpson wrote: On 21Sep2019 20:42, Markos wrote: >I have a table.csv file with the following structure: > >, Polyarene conc ,, mg L-1 ,,, >Spectrum, Py, Ace, Anth, >1, "0,456", "0,120", "0,168" >2, "0,456", "0,040", "0,280" >3, "0,152", "0,200", "0,280" > >I

Re: [Tutor] Most efficient way to replace ", " with "." in a array and/or dataframe

2019-09-21 Thread Cameron Simpson
On 21Sep2019 20:42, Markos wrote: I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,280" 3, "0,152", "0,200", "0,280" I open as dataframe with the command: data = pd.read_csv ('

Re: Most efficient way to replace "," with "." in a array and/or dataframe

2019-09-21 Thread MRAB
On 2019-09-22 00:42, Markos wrote: Hi, I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,280" 3, "0,152", "0,200", "0,280" I open as dataframe with the command: data = pd.read_

Most efficient way to replace "," with "." in a array and/or dataframe

2019-09-21 Thread Markos
Hi, I have a table.csv file with the following structure: , Polyarene conc ,, mg L-1 ,,, Spectrum, Py, Ace, Anth, 1, "0,456", "0,120", "0,168" 2, "0,456", "0,040", "0,280" 3, "0,152", "0,200", "0,280" I open as dataframe with the command: data = pd.read_csv ('table.csv', sep = ',', skiprow