Thank you Peter and Christ.
It is was a white space and the fix fixed it.
Many thanks.
On Friday, December 23, 2016 5:26 PM, Peter Otten <__pete...@web.de> wrote:
Val Krem via Python-list wrote:
> Here is the first few lines of the data
>
>
> s1.csv
> size,w1,h1
> 512,214,26
> 123,250,34
>
Val Krem via Python-list wrote:
> Here is the first few lines of the data
>
>
> s1.csv
> size,w1,h1
> 512,214,26
> 123,250,34
> 234,124,25
> 334,213,43
Did you put these lines here using copy and paste? The fix below depends on
the assumption that your data is more like
size, w1, h1
512, 214,
Here is the first few lines of the data
s1.csv
size,w1,h1
512,214,26
123,250,34
234,124,25
334,213,43
and the script
a=pd.read_csv("s1.csv", skipinitialspace=True).keys()
print(a)
i see the following
Index(['size', 'w1', 'h1'], dtype='object')
when I wanted to add the two columns;
Val Krem via Python-list wrote:
> Hi all,
>
> #!/usr/bin/env python
> import sys
> import csv
> import numpy as np
> import pandas as pd
>
> a= pd.read_csv("s1.csv")
> print(a)
>
> size w1 h1
> 0 512 214 26
> 1 123 250 34
> 2 234 124 25
> 3 334 213 43
> 4 a45 223 3
On Sat, Dec 24, 2016 at 7:39 AM, Val Krem via Python-list
wrote:
> a= pd.read_csv("s1.csv")
> File "pandas/src/hashtable_class_helper.pxi", line 740, in
> pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13107)
> KeyError: 'w1'
>
> Can someone help me what the problem is?
Can you
Hi all,
#!/usr/bin/env python
import sys
import csv
import numpy as np
import pandas as pd
a= pd.read_csv("s1.csv")
print(a)
size w1 h1
0 512 214 26
1 123 250 34
2 234 124 25
3 334 213 43
4 a45 223 32
5 a12 214 26
I wanted to create a new column by adding the t
David Shi writes:
>How to convert a JSON object into a Pandas data frame?
You can use read_json --
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_json.html to
read it into a dataframe. Or you can read the json into python objects and use
read_records to create a pan
How to convert a JSON object into a Pandas data frame?
I know that for XML, there are XML parsers.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Sushanth wrote:
> i need to convert r data frame to pandas dataframe and vise versa
>
Now, now, let's at least _try_ to help.
http://lmgtfy.com/?q=convert+r+data+frame+to+pandas
--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently o
On 17/02/2016 18:00, Sushanth wrote:
i need to convert r data frame to pandas dataframe and vise versa
It is very easy, just write some code. When you have finished, please
show us your results.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for o
On 17/02/16 18:00, Sushanth wrote:
i need to convert r data frame to pandas dataframe and vise versa
Wow! How do you plan to do that?
--
Tony van der Hoff| mailto:t...@vanderhoff.org
Buckinghamshire, England |
--
https://mail.python.org/mailman/listinfo/python-list
i need to convert r data frame to pandas dataframe and vise versa
--
*Regards*
*Sushanth*
*ph : 91-9444583307*
--
https://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo