workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
Oh - can it be a compatibility issue since my interpreter is Python 3.7.1?
2019-04-11T04:27:58.187500
Conchita
pythondev_help_Conchita_2019-04-11T04:27:58.187500
1,554,956,878.1875
18,121
pythondev
help
no idea if google sdk support 3.7, that might be the reason
2019-04-11T04:33:34.188100
Jimmy
pythondev_help_Jimmy_2019-04-11T04:33:34.188100
1,554,957,214.1881
18,122
pythondev
help
I see now they only support 3.6.6, so probably the reason
2019-04-11T04:37:41.188900
Conchita
pythondev_help_Conchita_2019-04-11T04:37:41.188900
1,554,957,461.1889
18,123
pythondev
help
I need a help with python
2019-04-11T05:42:13.190900
Bruna
pythondev_help_Bruna_2019-04-11T05:42:13.190900
1,554,961,333.1909
18,124
pythondev
help
[('A1', u'Country'), ('B1', u'Invoice required for Ancillary Supply Import License?'), ('C1', u'Notification of shipment to be provided to (AS)')] : How to read only Country, Invoice required for Ancillary Supply Import License?, Notification of shipment to be provided to (AS) etc
2019-04-11T05:43:13.191900
Bruna
pythondev_help_Bruna_2019-04-11T05:43:13.191900
1,554,961,393.1919
18,125
pythondev
help
Question: Does the `requests` module fully support Google App Engine? It works out-of-box?
2019-04-11T05:46:35.192200
Romana
pythondev_help_Romana_2019-04-11T05:46:35.192200
1,554,961,595.1922
18,126
pythondev
help
Hello, How to estimate effort to convert code RestAPI from Python 2 to Python 3?
2019-04-11T05:53:46.192900
Cinda
pythondev_help_Cinda_2019-04-11T05:53:46.192900
1,554,962,026.1929
18,127
pythondev
help
Depends on the code itself, the dependencies it has (some libraries that are old but functional never jumped the step of having python 3 support), and the size of it
2019-04-11T05:58:57.194200
My
pythondev_help_My_2019-04-11T05:58:57.194200
1,554,962,337.1942
18,128
pythondev
help
It's... Not an easy question without a lot more context :sweat_smile:
2019-04-11T05:59:17.194700
My
pythondev_help_My_2019-04-11T05:59:17.194700
1,554,962,357.1947
18,129
pythondev
help
<@Bruna> What is your question?
2019-04-11T06:05:54.195200
Valeri
pythondev_help_Valeri_2019-04-11T06:05:54.195200
1,554,962,754.1952
18,130
pythondev
help
```[('A1', u'Country'), ('B1', u'Invoice required for Ancillary Supply Import License?'), ('C1', u'Notification of shipment to be provided to (AS)')] : How to read only Country, Invoice required for Ancillary Supply Import License?, Notification of shipment to be provided to (AS) etc```
2019-04-11T06:06:26.195300
Leana
pythondev_help_Leana_2019-04-11T06:06:26.195300
1,554,962,786.1953
18,131
pythondev
help
yes, But have you any idea for this? I and my team have temporary solution is that restart to develop project in Python 3 env
2019-04-11T06:08:11.195500
Cinda
pythondev_help_Cinda_2019-04-11T06:08:11.195500
1,554,962,891.1955
18,132
pythondev
help
Don't see any problem there: ``` &gt;&gt;&gt; l = [('A1', u'Country'), ('B1', u'Invoice required for Ancillary Supply Import License?'), ('C1', u'Notification of shipment to be provided to (AS)')] &gt;&gt;&gt; l[0][1] 'Country' &gt;&gt;&gt; l[1][1] 'Invoice required for Ancillary Supply Import License?' &gt;&gt;&gt; l[2][1] 'Notification of shipment to be provided to (AS)' ```
2019-04-11T06:09:28.196000
Valeri
pythondev_help_Valeri_2019-04-11T06:09:28.196000
1,554,962,968.196
18,133
pythondev
help
<@Cinda> depends on the project size and the amount of effort your team is ready to put in, don't you think?
2019-04-11T06:10:44.196800
Valeri
pythondev_help_Valeri_2019-04-11T06:10:44.196800
1,554,963,044.1968
18,134
pythondev
help
hmm, but how I caculate the ratio. For eg: Effort for project in python 2: 100 hour How much is it in python 3?
2019-04-11T06:31:23.197100
Cinda
pythondev_help_Cinda_2019-04-11T06:31:23.197100
1,554,964,283.1971
18,135
pythondev
help
Similar or lesser probably
2019-04-11T06:32:15.197300
Valeri
pythondev_help_Valeri_2019-04-11T06:32:15.197300
1,554,964,335.1973
18,136
pythondev
help
Plus migration does not need complete re-writing
2019-04-11T06:32:37.197500
Valeri
pythondev_help_Valeri_2019-04-11T06:32:37.197500
1,554,964,357.1975
18,137
pythondev
help
Hi, you can maybe try this : <https://plot.ly/products/dash/>
2019-04-11T06:46:43.197700
Celinda
pythondev_help_Celinda_2019-04-11T06:46:43.197700
1,554,965,203.1977
18,138
pythondev
help
How much test coverage do you have? That’s an important thing to consider
2019-04-11T07:42:10.199000
Hiroko
pythondev_help_Hiroko_2019-04-11T07:42:10.199000
1,554,968,530.199
18,139
pythondev
help
<@Cinda> the reason we can’t give any specifics is this is analogous to asking how long it will take to update an older building to current building codes. You haven’t given any specs about architecture, third party libs, any usage of `six`, test coverage percentage, etc
2019-04-11T07:49:23.200500
Hiroko
pythondev_help_Hiroko_2019-04-11T07:49:23.200500
1,554,968,963.2005
18,140
pythondev
help
and just with older buildings, you’ll find a few gotchas that you can’t account for because they didn’t come up in original planning for whatever reason
2019-04-11T07:50:32.201500
Hiroko
pythondev_help_Hiroko_2019-04-11T07:50:32.201500
1,554,969,032.2015
18,141
pythondev
help
<@Cinda> Do you currently have access to the Python 2 code?
2019-04-11T08:08:38.202200
Chuck
pythondev_help_Chuck_2019-04-11T08:08:38.202200
1,554,970,118.2022
18,142
pythondev
help
Or are you attempting to quote without seeing the code?
2019-04-11T08:09:00.202500
Chuck
pythondev_help_Chuck_2019-04-11T08:09:00.202500
1,554,970,140.2025
18,143
pythondev
help
If you use regex: `\S+@\S+` otherwise if using html parser and xpath `//a[contains(@href, "mailto")]`
2019-04-11T11:55:49.208200
Sparkle
pythondev_help_Sparkle_2019-04-11T11:55:49.208200
1,554,983,749.2082
18,144
pythondev
help
I have a weird legal/coding question, not sure if its appropriate for this channel or not, but figured it would be worth a shot
2019-04-11T12:10:43.212500
Caridad
pythondev_help_Caridad_2019-04-11T12:10:43.212500
1,554,984,643.2125
18,145
pythondev
help
did some one say LEGAL!!!
2019-04-11T12:12:06.214200
Clemmie
pythondev_help_Clemmie_2019-04-11T12:12:06.214200
1,554,984,726.2142
18,146
pythondev
help
lets say you are building a publicly available UI, that takes data from the government or other publicly available sources. Lets say the original dataset is not really accessible to the lay user but you manipulate in a way that makes it accessible
2019-04-11T12:12:32.214600
Caridad
pythondev_help_Caridad_2019-04-11T12:12:32.214600
1,554,984,752.2146
18,147
pythondev
help
<@Clemmie> i was hoping you would chime in lol
2019-04-11T12:12:42.215000
Caridad
pythondev_help_Caridad_2019-04-11T12:12:42.215000
1,554,984,762.215
18,148
pythondev
help
then let say your UI ends up steering consumers to different products
2019-04-11T12:13:08.215600
Caridad
pythondev_help_Caridad_2019-04-11T12:13:08.215600
1,554,984,788.2156
18,149
pythondev
help
can a company sue you for steering customers away
2019-04-11T12:13:25.216300
Caridad
pythondev_help_Caridad_2019-04-11T12:13:25.216300
1,554,984,805.2163
18,150
pythondev
help
sue you and win
2019-04-11T12:13:43.216900
Caridad
pythondev_help_Caridad_2019-04-11T12:13:43.216900
1,554,984,823.2169
18,151
pythondev
help
Publicly available is a canard -what you really want to know is what the copyright on the data is (if it can have one - facts are not copyrightable)
2019-04-11T12:14:39.218900
Clemmie
pythondev_help_Clemmie_2019-04-11T12:14:39.218900
1,554,984,879.2189
18,152
pythondev
help
But say it is open data - you would be fine in almost all accounts
2019-04-11T12:15:10.220000
Clemmie
pythondev_help_Clemmie_2019-04-11T12:15:10.220000
1,554,984,910.22
18,153
pythondev
help
Do you have a specific hypothetical in mind?
2019-04-11T12:15:39.221100
Clemmie
pythondev_help_Clemmie_2019-04-11T12:15:39.221100
1,554,984,939.2211
18,154
pythondev
help
Hi, quick question… I am parsing a pos transaction log XML message to build a CSV file for another system to import. I have that all working but just realized that the transactions need to be grouped and summed by the hour and minute they occurred or else they override each other. I could put all the data into a dictionary, and before inserting each record, search the dictionary and add a sum of the values to any matching record with the same minute and hour. I am wondering if there is a cleaner way to do it though. It’s the equivalent of inserting all the data into a sql table and then issuing a select statement with a group by.
2019-04-11T12:15:40.221200
Kit
pythondev_help_Kit_2019-04-11T12:15:40.221200
1,554,984,940.2212
18,155
pythondev
help
so openfda data
2019-04-11T12:16:01.221600
Caridad
pythondev_help_Caridad_2019-04-11T12:16:01.221600
1,554,984,961.2216
18,156
pythondev
help
but the copyright makes sense need to look into that more
2019-04-11T12:16:14.222100
Caridad
pythondev_help_Caridad_2019-04-11T12:16:14.222100
1,554,984,974.2221
18,157
pythondev
help
i am getting output after reading excel in particular format using some library. [('A1', u'Country'), ('B1', u'Invoice required for Ancillary Supply Import License?'), ('C1', u'Notification of shipment to be provided to (AS)')] and further how can i read only Country, Invoice required for Ancillary Supply Import License?, Notification of shipment to be provided to (AS) etc
2019-04-11T12:16:33.222900
Bruna
pythondev_help_Bruna_2019-04-11T12:16:33.222900
1,554,984,993.2229
18,158
pythondev
help
i would appreciate the suggestion
2019-04-11T12:16:47.223300
Bruna
pythondev_help_Bruna_2019-04-11T12:16:47.223300
1,554,985,007.2233
18,159
pythondev
help
and say a hospital system sueing you or sending a cease and desist, if somehow your ui steers pts away from them for whatever reason
2019-04-11T12:16:52.223500
Caridad
pythondev_help_Caridad_2019-04-11T12:16:52.223500
1,554,985,012.2235
18,160
pythondev
help
Unless otherwise noted all the openFDA data is CC0 1.0 - do what you want
2019-04-11T12:17:10.223700
Clemmie
pythondev_help_Clemmie_2019-04-11T12:17:10.223700
1,554,985,030.2237
18,161
pythondev
help
makes sense
2019-04-11T12:17:31.223900
Caridad
pythondev_help_Caridad_2019-04-11T12:17:31.223900
1,554,985,051.2239
18,162
pythondev
help
seems silly to make all that stuff public but then expose people to liability for using it
2019-04-11T12:17:56.224300
Caridad
pythondev_help_Caridad_2019-04-11T12:17:56.224300
1,554,985,076.2243
18,163
pythondev
help
Ahh, different question, doesn’t really have anything to do with the data itself. More
2019-04-11T12:18:23.225000
Clemmie
pythondev_help_Clemmie_2019-04-11T12:18:23.225000
1,554,985,103.225
18,164
pythondev
help
‘restraint of trade’ issue. Even there you will be generally fine
2019-04-11T12:19:35.226200
Clemmie
pythondev_help_Clemmie_2019-04-11T12:19:35.226200
1,554,985,175.2262
18,165
pythondev
help
rely on the data, be impartial, you would be fine
2019-04-11T12:20:06.227400
Clemmie
pythondev_help_Clemmie_2019-04-11T12:20:06.227400
1,554,985,206.2274
18,166
pythondev
help
even if you didn’t and weren’t you would still likely be fine
2019-04-11T12:20:27.228200
Clemmie
pythondev_help_Clemmie_2019-04-11T12:20:27.228200
1,554,985,227.2282
18,167
pythondev
help
makes sense thanks for the input much appreciated <@Clemmie> :taco: :taco:
2019-04-11T12:20:52.229000
Caridad
pythondev_help_Caridad_2019-04-11T12:20:52.229000
1,554,985,252.229
18,168
pythondev
help
Courts will almost universally favor something that supports consumer choice and lower prices, unless there is an egregious violation of some other law or public good
2019-04-11T12:22:01.230200
Clemmie
pythondev_help_Clemmie_2019-04-11T12:22:01.230200
1,554,985,321.2302
18,169
pythondev
help
might be getting outside the realm of python but I'm running into issues with values not carrying over between Serverless-&gt;AWS API GAteway-&gt;Swagger Export. Specifically I can't figure out how to define a field in Serverless that will show up as an `operationId` in swagger
2019-04-11T12:23:31.231000
Claudine
pythondev_help_Claudine_2019-04-11T12:23:31.231000
1,554,985,411.231
18,170
pythondev
help
Hi yes math is my thing :slightly_smiling_face: Is Project Euler a slack channel?. I mean over and above <https://projecteuler.net/>
2019-04-11T12:46:29.231700
Erika
pythondev_help_Erika_2019-04-11T12:46:29.231700
1,554,986,789.2317
18,171
pythondev
help
I'm not aware of an Euler slack, though the site does have a forum.
2019-04-11T12:48:09.232000
Sasha
pythondev_help_Sasha_2019-04-11T12:48:09.232000
1,554,986,889.232
18,172
pythondev
help
Figured it out after tinkering for a while-- Go to your resource method on API Gateway, then Method Request, and in SDK Generation, give Operation Name the name, and that will be OperationID when exported to swagger. I don't know if that is the right way, but it seems to work :stuck_out_tongue:
2019-04-11T13:20:07.232500
Raguel
pythondev_help_Raguel_2019-04-11T13:20:07.232500
1,554,988,807.2325
18,173
pythondev
help
yea i just figured out the same, it exports correctly and seems to persist through additonal `serverless deploy`'s, I suppose this will get me by for now but it's annoying I can't define it explicitly :disappointed:
2019-04-11T13:37:44.232700
Claudine
pythondev_help_Claudine_2019-04-11T13:37:44.232700
1,554,989,864.2327
18,174
pythondev
help
it does mention 'operationName' here in this <https://docs.aws.amazon.com/apigateway/api-reference/resource/method/> but I can't figure out how
2019-04-11T13:52:28.233000
Raguel
pythondev_help_Raguel_2019-04-11T13:52:28.233000
1,554,990,748.233
18,175
pythondev
help
Anyone have any tips or help for setting up a docker container for a Flask production app with redis?
2019-04-11T14:23:24.233900
Hanna
pythondev_help_Hanna_2019-04-11T14:23:24.233900
1,554,992,604.2339
18,176
pythondev
help
Trying to learn how to use Docker and all
2019-04-11T14:23:31.234200
Hanna
pythondev_help_Hanna_2019-04-11T14:23:31.234200
1,554,992,611.2342
18,177
pythondev
help
and now i’m trying to post it to Heroku
2019-04-11T14:23:39.234500
Hanna
pythondev_help_Hanna_2019-04-11T14:23:39.234500
1,554,992,619.2345
18,178
pythondev
help
Well, I posted it to Heroku but it fails because I need to set it as a production environment
2019-04-11T14:29:16.235100
Hanna
pythondev_help_Hanna_2019-04-11T14:29:16.235100
1,554,992,956.2351
18,179
pythondev
help
yea i tried that one too and it didn't do anything for me
2019-04-11T14:37:08.235800
Claudine
pythondev_help_Claudine_2019-04-11T14:37:08.235800
1,554,993,428.2358
18,180
pythondev
help
i think `operationName` is a display name and `operationId` is used for SDK methods
2019-04-11T14:37:45.236000
Claudine
pythondev_help_Claudine_2019-04-11T14:37:45.236000
1,554,993,465.236
18,181
pythondev
help
ive moved on ¯\_(ツ)_/¯
2019-04-11T14:37:51.236200
Claudine
pythondev_help_Claudine_2019-04-11T14:37:51.236200
1,554,993,471.2362
18,182
pythondev
help
anyone know anything about how to get a certificate from an url? to enable ssl commands?
2019-04-11T14:39:15.236900
Erika
pythondev_help_Erika_2019-04-11T14:39:15.236900
1,554,993,555.2369
18,183
pythondev
help
Might want to try <#C22DMH61M|devops>
2019-04-11T14:50:06.237600
Karoline
pythondev_help_Karoline_2019-04-11T14:50:06.237600
1,554,994,206.2376
18,184
pythondev
help
Hello. I am having some trouble selecting data from Pandas dataframes. How do I select the values from 'NAc Core L' that have 700 as value in the 'Coordinate' column? Thanks!
2019-04-11T14:55:07.237900
Ming
pythondev_help_Ming_2019-04-11T14:55:07.237900
1,554,994,507.2379
18,185
pythondev
help
temp=df.loc[df['Coordinate']==700] result=temp.iloc[:]['NAc Core L']
2019-04-11T15:01:06.241300
Erika
pythondev_help_Erika_2019-04-11T15:01:06.241300
1,554,994,866.2413
18,186
pythondev
help
something like that :slightly_smiling_face:
2019-04-11T15:01:41.241700
Erika
pythondev_help_Erika_2019-04-11T15:01:41.241700
1,554,994,901.2417
18,187
pythondev
help
I think that will do. Thanks a lot!! :slightly_smiling_face:
2019-04-11T15:02:25.241900
Ming
pythondev_help_Ming_2019-04-11T15:02:25.241900
1,554,994,945.2419
18,188
pythondev
help
hehe pleasure :slightly_smiling_face: . though i personally prefer to switch to arrays and use for loops
2019-04-11T15:04:01.242500
Erika
pythondev_help_Erika_2019-04-11T15:04:01.242500
1,554,995,041.2425
18,189
pythondev
help
if you are finding yourself having to do alot of that kind of searching then try the R programming language. and use the sqldf package
2019-04-11T15:04:37.243200
Erika
pythondev_help_Erika_2019-04-11T15:04:37.243200
1,554,995,077.2432
18,190
pythondev
help
<https://pypi.org/project/pysqldf/>
2019-04-11T15:05:14.243400
Erika
pythondev_help_Erika_2019-04-11T15:05:14.243400
1,554,995,114.2434
18,191
pythondev
help
'select * from dataframe where column1=x and column2=y'
2019-04-11T15:05:29.243900
Erika
pythondev_help_Erika_2019-04-11T15:05:29.243900
1,554,995,129.2439
18,192
pythondev
help
google docker-compose. there are some hello world examples :slightly_smiling_face: <https://docs.docker.com/compose/gettingstarted/>
2019-04-11T15:07:18.244000
Erika
pythondev_help_Erika_2019-04-11T15:07:18.244000
1,554,995,238.244
18,193
pythondev
help
it should not be a major issue. except if you are implementing AI packages
2019-04-11T15:10:37.244400
Erika
pythondev_help_Erika_2019-04-11T15:10:37.244400
1,554,995,437.2444
18,194
pythondev
help
I’ve never ran into this in python before. I am trying my hand at representing a directed graph. I have two clasess, each of which reference the other. How do you write code like this, so that you don’t get a &gt; NameError: name ‘GrahgNode’ is not defined ``` class GraphEdge: def __init__(self, source: GraphNode, destination: GraphNode, max: int): self.source = source self.destination = destination self.max = max self.current = 0 class GraphNode: def __init__(self, name: str): self.name: str = name self.edges: [GraphEdges] = [] def add_edge(self, destination: GraphNode, max: int): self.append(GraphEdge(self, destination, max)) ```
2019-04-11T15:22:52.245400
Cammie
pythondev_help_Cammie_2019-04-11T15:22:52.245400
1,554,996,172.2454
18,195
pythondev
help
i think sub classes would work here? either that or create a third class that uses the previous two?
2019-04-11T15:24:22.246000
Erika
pythondev_help_Erika_2019-04-11T15:24:22.246000
1,554,996,262.246
18,196
pythondev
help
something like letsencrypt ?
2019-04-11T15:28:35.246100
Jimmy
pythondev_help_Jimmy_2019-04-11T15:28:35.246100
1,554,996,515.2461
18,197
pythondev
help
thanks i'l check it out :slightly_smiling_face:
2019-04-11T15:29:36.246300
Erika
pythondev_help_Erika_2019-04-11T15:29:36.246300
1,554,996,576.2463
18,198
pythondev
help
I’m not sure the latter is a route I want to go down
2019-04-11T15:29:46.246700
Cammie
pythondev_help_Cammie_2019-04-11T15:29:46.246700
1,554,996,586.2467
18,199
pythondev
help
The former does not work
2019-04-11T15:30:30.246900
Cammie
pythondev_help_Cammie_2019-04-11T15:30:30.246900
1,554,996,630.2469
18,200
pythondev
help
``` class GraphNode: class GraphEdge: def __init__(self, source: GraphNode, destination: GraphNode, max: int): self.source = source self.destination = destination self.max = max self.current = 0 def __init__(self, name: str): self.name: str = name self.edges: [GraphEdges] = [] def add_edge(self, destination: GraphNode, max: int): self.append(GraphEdge(self, destination, max)) ```
2019-04-11T15:30:34.247100
Cammie
pythondev_help_Cammie_2019-04-11T15:30:34.247100
1,554,996,634.2471
18,201
pythondev
help
I definitely have a mistake unrelated to what I asked. Apologies
2019-04-11T15:33:27.247400
Cammie
pythondev_help_Cammie_2019-04-11T15:33:27.247400
1,554,996,807.2474
18,202
pythondev
help
its the type hinting, where `add_edge` type hints taking in an object of its same type, `GraphNode`…
2019-04-11T15:34:16.247900
Cammie
pythondev_help_Cammie_2019-04-11T15:34:16.247900
1,554,996,856.2479
18,203
pythondev
help
<https://stackoverflow.com/a/35617812/1983957> Solved my issue
2019-04-11T15:35:43.248100
Cammie
pythondev_help_Cammie_2019-04-11T15:35:43.248100
1,554,996,943.2481
18,204
pythondev
help
the error comes from type hints
2019-04-11T15:41:11.248400
Kendra
pythondev_help_Kendra_2019-04-11T15:41:11.248400
1,554,997,271.2484
18,205
pythondev
help
you have two ways to handle this
2019-04-11T15:41:23.248600
Kendra
pythondev_help_Kendra_2019-04-11T15:41:23.248600
1,554,997,283.2486
18,206
pythondev
help
for python 3.7+
2019-04-11T15:41:27.248800
Kendra
pythondev_help_Kendra_2019-04-11T15:41:27.248800
1,554,997,287.2488
18,207
pythondev
help
just put `from __future__ import annotations` at the top of your file and you'll be good to go
2019-04-11T15:41:55.249000
Kendra
pythondev_help_Kendra_2019-04-11T15:41:55.249000
1,554,997,315.249
18,208
pythondev
help
for ealier versions put type hints which are not defined yet in strings like this
2019-04-11T15:42:14.249200
Kendra
pythondev_help_Kendra_2019-04-11T15:42:14.249200
1,554,997,334.2492
18,209
pythondev
help
kk ty mate
2019-04-11T15:42:26.249400
Cammie
pythondev_help_Cammie_2019-04-11T15:42:26.249400
1,554,997,346.2494
18,210
pythondev
help
```class GraphEdge: def __init__(self, source: "GraphNode", destination: "GraphNode", max: int): self.source = source ```
2019-04-11T15:42:30.249600
Kendra
pythondev_help_Kendra_2019-04-11T15:42:30.249600
1,554,997,350.2496
18,211
pythondev
help
np
2019-04-11T15:43:16.250000
Kendra
pythondev_help_Kendra_2019-04-11T15:43:16.250000
1,554,997,396.25
18,212
pythondev
help
Can someone point out what Im doing wrong here, I cant figure it out and its probably something simple. I am trying to sum values in a list of dictionaries but for some reason only the first line of code I am using to sum actually gets summed, the next value is always a zero even when I switch them. I pasted the results below where is show the flip flop but in both cases bothe sums should be equal to 2. ``` grouper = itemgetter("storeCode", "shipDate", "shipTime") result = [] for key, grp in groupby(sorted(tlog_dict_list, key = grouper), grouper): temp_dict = dict(zip(["storeCode", "shipDate", "shipTime"], key)) temp_dict["salesTrans"] = sum(item["salesTrans"] for item in grp) temp_dict["saleUnits"] = sum(item["saleUnits"] for item in grp) pprint(result) ``` ``` [{'saleUnits': 0, 'salesTrans': 2, 'shipDate': u'2019-03-05', 'shipTime': u'22:56', 'storeCode': u'52'}] ``` ```[{'saleUnits': 2, 'salesTrans': 0, 'shipDate': u'2019-03-05', 'shipTime': u'22:56', 'storeCode': u'52'}] ```
2019-04-11T15:55:39.254900
Kit
pythondev_help_Kit_2019-04-11T15:55:39.254900
1,554,998,139.2549
18,213
pythondev
help
this is the original list ``` =====tlog_dict_list======= [{'Accessories': '', 'Apparel': '', 'ECommerceReturnItems': '', 'ECommerceReturnTrans': '', 'ECommerceReturns': '', 'Footwear': '', 'ProShop': '', 'RefundTrans': '', 'RefundUnits': '', 'RefundValue': '', 'Socks': '', 'saleUnits': 1, 'saleValue': u'38.33USD', 'salesTrans': 1, 'shipDate': u'2019-03-05', 'shipTime': u'22:56', 'storeCode': u'52'}, {'Accessories': '', 'Apparel': '', 'ECommerceReturnItems': '', 'ECommerceReturnTrans': '', 'ECommerceReturns': '', 'Footwear': '', 'ProShop': '', 'RefundTrans': '', 'RefundUnits': '', 'RefundValue': '', 'Socks': '', 'saleUnits': 1, 'saleValue': u'54.32USD', 'salesTrans': 1, 'shipDate': u'2019-03-05', 'shipTime': u'22:56', 'storeCode': u'52'}] ```
2019-04-11T15:58:19.255900
Kit
pythondev_help_Kit_2019-04-11T15:58:19.255900
1,554,998,299.2559
18,214
pythondev
help
The suggestion worked. And thanks a lot for the link! I will look into it :slightly_smiling_face:
2019-04-11T15:58:32.256000
Ming
pythondev_help_Ming_2019-04-11T15:58:32.256000
1,554,998,312.256
18,215
pythondev
help
I'm suspecting that `grp` is a one-time iterator rather than an actual list you can go through as many times as you want. You may need to make a copy of it.
2019-04-11T16:01:38.256800
Sasha
pythondev_help_Sasha_2019-04-11T16:01:38.256800
1,554,998,498.2568
18,216
pythondev
help
ok, thanks, I’ll give that a try
2019-04-11T16:07:43.257100
Kit
pythondev_help_Kit_2019-04-11T16:07:43.257100
1,554,998,863.2571
18,217
pythondev
help
I change it to this and got the same result… Is this what you meant by make a copy? ``` grp2_copy = grp temp_dict["salesTrans"] = sum(item["salesTrans"] for item in grp) temp_dict["saleUnits"] = sum(item["saleUnits"] for item in grp2_copy) ```
2019-04-11T16:10:19.257900
Kit
pythondev_help_Kit_2019-04-11T16:10:19.257900
1,554,999,019.2579
18,218
pythondev
help
one sec, I google copying a on time iterator and have something to try
2019-04-11T16:12:08.258900
Kit
pythondev_help_Kit_2019-04-11T16:12:08.258900
1,554,999,128.2589
18,219
pythondev
help
no, not quite
2019-04-11T16:13:03.259500
Hiroko
pythondev_help_Hiroko_2019-04-11T16:13:03.259500
1,554,999,183.2595
18,220