Joao Vitorino

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Nov 27, 2017 14:01
@Kevin I agree.
Nov 4, 2017 02:53
@Code-Apprentice Thanks for your comment there.
Nov 4, 2017 02:48
@Code-Apprentice like pycharm, pip, maven and etc. I understand that. The problem is I always was too direct and too sincere. But the line between sincerity and roughness is tenuous
Nov 4, 2017 02:19
Nov 3, 2017 20:06
Nov 3, 2017 18:50
@AnttiHaapala Thanks. Simple to explain, easy to understand
Nov 3, 2017 18:45
:39879533 The output of first give only the column 'tempo', the other show all the columns
Nov 3, 2017 18:43
and
Nov 3, 2017 18:43
print(df1.groupby(['nome', 'triggerid', 'desc'])['tempo'].sum().reset_index())
Nov 3, 2017 18:42
df1.groupby(['nome', 'triggerid', 'desc'])['time'].sum().reset_index()
print(df1)
Nov 3, 2017 18:42
Why the output is different when I run
Oct 28, 2017 20:16
It's weird think in coding when bored?
Oct 21, 2017 02:20
@Code-Apprentice Sorry, my bad
Oct 21, 2017 02:07
Anyone to help-me wthis this stackoverflow.com/q/46859400/4175515
Oct 19, 2017 19:24
@Kevin Same value but diferent objectid
Oct 19, 2017 19:23
@DSM Thanks. I was trying to do something iterating over the rows and for every row doing a lot of checks with a lot of loops. But what [:, ::-1] means. I know this is slicing notation but I don't understand the ,
Oct 19, 2017 19:20
There is just part of the dataframe, the real dataframe contains more than 500 rows.
Oct 19, 2017 19:18
@Kevin I solve this problem before the create of dataframe.
Oct 19, 2017 19:16
32219 --- 1505960158 --- 1505962773
Oct 19, 2017 19:15
So lines 0 and 1 will be
Oct 19, 2017 19:14
So I need to transforme this dataframe into another whit this headers (objectid, start_time, end_time)
Oct 19, 2017 19:12
where valu = 1 means start time and value = 0 means stop time
Oct 19, 2017 19:11
@Code-Apprentice thanks
Oct 19, 2017 19:11
--- clock-------- eventid ---- objectid --- value
0 1505960158 62704261 32219 1
1 1505962773 62711138 32219 0
2 1505400465 61216428 32233 1
3 1504642494 59208977 32254 1
4 1504643325 59210478 32254 0
Oct 19, 2017 19:09
clock eventid objectid value
0 1505960158 62704261 32219 1
1 1505962773 62711138 32219 0
2 1505400465 61216428 32233 1
3 1504642494 59208977 32254 1
4 1504643325 59210478 32254 0
Oct 19, 2017 19:09
Hi everyone. I'm having dificult to find the logical necessary to solve a problem. I have a pandas dataframe like this