Answer the question
In order to leave comments, you need to log in
How to sum data into a column without grouping?
I have a dataset:
d = {
'dt': [
'01.01.2020',
'01.01.2020',
'01.01.2020',
'01.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'03.01.2020',
'03.01.2020',
'03.01.2020',
],
'name': [
'Billy',
'Dilly',
'Villy',
'Villy',
'Billy',
'Dilly',
'Villy',
'Billy',
'Dilly',
'Villy',
'Billy',
'Dilly']}
test = pd.DataFrame(data=d)
'count'
that d = {
'dt': [
'01.01.2020',
'01.01.2020',
'01.01.2020',
'01.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'02.01.2020',
'03.01.2020',
'03.01.2020',
'03.01.2020',
],
'name': [
'Billy',
'Dilly',
'Villy',
'Villy',
'Billy',
'Dilly',
'Villy',
'Billy',
'Dilly',
'Villy',
'Billy',
'Dilly'],
'count': [
4,
4,
4,
4,
5,
5,
5,
5,
5,
3,
3,
3],
}
test = pd.DataFrame(data=d)
Answer the question
In order to leave comments, you need to log in
the question is described here:
https://stackoverflow.com/questions/57874745/how-t...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question