Hi all,
Is there on line course in Python? I am looking for a level between beginner
and intermediate. I would appreciate if you could suggest me?
Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
Hi all,
How do I access the rows and columns of a data frame crosstab output?
Here is code using a sample data and output.
a= pd.read_csv("cross.dat", skipinitialspace=True)
xc=pd.crosstab(a['nam'],a['x1'],margins=True)
print(xc)
x10 1
nam
A13 2
A21 4
I want to create a va
Hi all,
I have a sample of data set and would like to summarize in the following way.
ID,class,y
1,12,10
1,12,10
1,12,20
1,13,20
1,13,10
1,13,10
1,14,20
2,21,20
2,21,20
2,21,10
2,23,10
2,23,20
2,34,20
2,34,10
2,35,10
I want get the total count by ID, and the the number of classes
by ID. The
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
>
ntel/intelpython35/lib/python3.5/site-packages/pandas/indexes/base.py",
line 1393, in __getitem__
return getitem(key)
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis
(`None`) and integer or boolean arrays are valid indices
On Friday, December 23, 2016 3:09 PM, P
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
Hi all,
Sorry for asking such a basic question butI am trying to merge two files(file1
and file2) and do some stuff. Merge the two files by the first column(key).
Here is the description of files and what I would like to do.
file1
key c1 c2
1 759 939
2 345 154571
3 251 350711
4 3749
Hi all,
I am trying to read sas7bdat file using the following
from sas7bdat import SAS7BDAT
with SAS7BDAT('test.sas7bdat') as f:
for row in f:
print row ### I want print the first 10 row. how can I do that?
I got error message of
from sas7bdat import SAS7BDAT
ImportError: No mo
Hi all,
I am made a little progress on using python.
I have five files to read from different sources and concatenate them to one
file. From each file I want only to pick few column (x1, x2 and x3).
However, these columns say x3 was a date in one file it was recorded as a
character
Thank you very much for the help.
First I want count by city and year.
City year count
Xc1.2001. 1
Xc1.2002. 3
Yv1. 2001. 1
Yv2.2002. 4
This worked fine !
Now I want to count by city only
City. Count
Xc1. 4
Yv2. 5
Then combine these two objects with the original data and
Hi all,
I am a new learner about python (moving from R to python) and trying read and
count the number of observation by year for each city.
The data set look like
city year x
XC1 2001 10
XC1 2001 20
XC1 2002 20
XC1 2002 10
XC1 2002 10
Yv2 2001 10
Yv2 2002 20
Yv2 2002
11 matches
Mail list logo