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: 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_