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
I've never tried creating a dataframe that way....I'll have to play with it a bit. I'm at work right now, so I may not be able to respond immediately, but in the meantime, maybe try to avoid the dictionary portion until the end? It seems as though you're setting your dict to be a dataframe on line 19 (I'm still learn...
2019-01-16T17:01:57.602900
Marth
pythondev_help_Marth_2019-01-16T17:01:57.602900
1,547,658,117.6029
2,821
pythondev
help
or perhaps work with just dicts?
2019-01-16T17:02:20.603300
Marth
pythondev_help_Marth_2019-01-16T17:02:20.603300
1,547,658,140.6033
2,822
pythondev
help
the append on line 20 looks like a "dict" append method
2019-01-16T17:02:36.603700
Marth
pythondev_help_Marth_2019-01-16T17:02:36.603700
1,547,658,156.6037
2,823
pythondev
help
to briefly explain the process: I am having to convert the companies statements to be formatted correctly for quickbooks import. for our lowes statements, each employee has their own section for each transaction. I posted the data layout a few hours ago. the application will be building each employees dictionary as a d...
2019-01-16T17:08:40.607800
Nenita
pythondev_help_Nenita_2019-01-16T17:08:40.607800
1,547,658,520.6078
2,824
pythondev
help
if I dont use a dictionary for each dataframe at the time of creation, the code will be messy because i may have to add a dataframe line by line for each employee. so i was hoping to assign each employee their dataframe and then insert that into a a dictionary to be called on when selected from the employee list.
2019-01-16T17:10:11.609400
Nenita
pythondev_help_Nenita_2019-01-16T17:10:11.609400
1,547,658,611.6094
2,825
pythondev
help
None
2019-01-16T21:11:22.609500
Hai
pythondev_help_Hai_2019-01-16T21:11:22.609500
1,547,673,082.6095
2,826
pythondev
help
<@Shan> <@Sasha> <@Marth>
2019-01-16T21:15:37.610000
Hai
pythondev_help_Hai_2019-01-16T21:15:37.610000
1,547,673,337.61
2,827
pythondev
help
it looks like the keys in `data` are what you want to associate to `apple` and the value is associated to `banana`.
2019-01-16T21:17:46.611000
Shan
pythondev_help_Shan_2019-01-16T21:17:46.611000
1,547,673,466.611
2,828
pythondev
help
dict can only contain unique keys.
2019-01-16T21:18:09.611600
Shan
pythondev_help_Shan_2019-01-16T21:18:09.611600
1,547,673,489.6116
2,829
pythondev
help
so, you may consider `{'apple':['a', 'a1'], 'banana': ['b', 'b1']}`
2019-01-16T21:18:57.612800
Shan
pythondev_help_Shan_2019-01-16T21:18:57.612800
1,547,673,537.6128
2,830
pythondev
help
<@Shan> noo i need the single key value pair at a time
2019-01-16T21:19:46.613300
Hai
pythondev_help_Hai_2019-01-16T21:19:46.613300
1,547,673,586.6133
2,831
pythondev
help
is there anyway can i convert the dict to string ?
2019-01-16T21:20:00.613900
Hai
pythondev_help_Hai_2019-01-16T21:20:00.613900
1,547,673,600.6139
2,832
pythondev
help
well you can make it a list of dicts.
2019-01-16T21:20:24.614200
Shan
pythondev_help_Shan_2019-01-16T21:20:24.614200
1,547,673,624.6142
2,833
pythondev
help
`[{'apple': 'a'}, {'apple': 'a1'}, {'banana': 'b'}, {'banana': 'b1'}]`
2019-01-16T21:21:03.614900
Shan
pythondev_help_Shan_2019-01-16T21:21:03.614900
1,547,673,663.6149
2,834
pythondev
help
noo is there any way can i manipulate the dict and make it happen?
2019-01-16T21:22:14.615700
Hai
pythondev_help_Hai_2019-01-16T21:22:14.615700
1,547,673,734.6157
2,835
pythondev
help
no
2019-01-16T21:22:28.615900
Shan
pythondev_help_Shan_2019-01-16T21:22:28.615900
1,547,673,748.6159
2,836
pythondev
help
`{"apple":"a","Banana":"b","apple":"a1","Banana":"b1"}` is invalid.
2019-01-16T21:22:37.616100
Shan
pythondev_help_Shan_2019-01-16T21:22:37.616100
1,547,673,757.6161
2,837
pythondev
help
```&gt;&gt;&gt; foo = {"apple":"a","Banana":"b","apple":"a1","Banana":"b1"} &gt;&gt;&gt; foo {'apple': 'a1', 'Banana': 'b1'}```
2019-01-16T21:23:10.616700
Shan
pythondev_help_Shan_2019-01-16T21:23:10.616700
1,547,673,790.6167
2,838
pythondev
help
lets back up.
2019-01-16T21:23:36.617200
Shan
pythondev_help_Shan_2019-01-16T21:23:36.617200
1,547,673,816.6172
2,839
pythondev
help
yeahh my aim is to add apple and banana ass keys and vaues for the existing the json
2019-01-16T21:23:52.618200
Hai
pythondev_help_Hai_2019-01-16T21:23:52.618200
1,547,673,832.6182
2,840
pythondev
help
_why_ do you need `{"apple":"a","Banana":"b","apple":"a1","Banana":"b1"}`
2019-01-16T21:24:00.618300
Shan
pythondev_help_Shan_2019-01-16T21:24:00.618300
1,547,673,840.6183
2,841
pythondev
help
why cant you do one of the other suggestions?
2019-01-16T21:24:16.618700
Shan
pythondev_help_Shan_2019-01-16T21:24:16.618700
1,547,673,856.6187
2,842
pythondev
help
the api is build like that
2019-01-16T21:24:25.618800
Hai
pythondev_help_Hai_2019-01-16T21:24:25.618800
1,547,673,865.6188
2,843
pythondev
help
yeah
2019-01-16T21:24:26.619000
Hai
pythondev_help_Hai_2019-01-16T21:24:26.619000
1,547,673,866.619
2,844
pythondev
help
how would i make them as list?
2019-01-16T21:24:36.619400
Hai
pythondev_help_Hai_2019-01-16T21:24:36.619400
1,547,673,876.6194
2,845
pythondev
help
{'apple':['a', 'a1'], 'banana': ['b', 'b1']} i think this works
2019-01-16T21:25:08.619600
Hai
pythondev_help_Hai_2019-01-16T21:25:08.619600
1,547,673,908.6196
2,846
pythondev
help
how would i make {'apple':['a', 'a1'], 'banana': ['b', 'b1']} this happen?
2019-01-16T21:25:26.620000
Hai
pythondev_help_Hai_2019-01-16T21:25:26.620000
1,547,673,926.62
2,847
pythondev
help
```&gt;&gt;&gt; data = {"a":"b","a1":"b1"} &gt;&gt;&gt; my_dict = dict() &gt;&gt;&gt; for k, v in data.items(): ... if not 'apple' in my_dict: ... my_dict['apple'] = list() ... if not 'banana' in my_dict: ... my_dict['banana'] = list() ... my_dict['apple'].append(k) ... my_dict['...
2019-01-16T21:28:31.620200
Shan
pythondev_help_Shan_2019-01-16T21:28:31.620200
1,547,674,111.6202
2,848
pythondev
help
you can make that better but thats the gist.
2019-01-16T21:28:39.620400
Shan
pythondev_help_Shan_2019-01-16T21:28:39.620400
1,547,674,119.6204
2,849
pythondev
help
yeahh I will try this.
2019-01-16T21:30:39.620800
Hai
pythondev_help_Hai_2019-01-16T21:30:39.620800
1,547,674,239.6208
2,850
pythondev
help
None
2019-01-16T21:31:57.621000
Hai
pythondev_help_Hai_2019-01-16T21:31:57.621000
1,547,674,317.621
2,851
pythondev
help
elaborate what you mean
2019-01-16T21:32:43.621500
Shan
pythondev_help_Shan_2019-01-16T21:32:43.621500
1,547,674,363.6215
2,852
pythondev
help
well actually
2019-01-16T21:33:02.622200
Shan
pythondev_help_Shan_2019-01-16T21:33:02.622200
1,547,674,382.6222
2,853
pythondev
help
i get it
2019-01-16T21:33:04.622600
Shan
pythondev_help_Shan_2019-01-16T21:33:04.622600
1,547,674,384.6226
2,854
pythondev
help
before appending them to `my_dict`.
2019-01-16T21:33:16.623200
Shan
pythondev_help_Shan_2019-01-16T21:33:16.623200
1,547,674,396.6232
2,855
pythondev
help
the json what am getting has no value it just has a key. so my code doesn't work if it has no value. so instead of that i want to add a string just to make it work
2019-01-16T21:33:47.624200
Hai
pythondev_help_Hai_2019-01-16T21:33:47.624200
1,547,674,427.6242
2,856
pythondev
help
do some conditionals on `k` or `v` and if either is None, assign the appropriate value with whatever string you want
2019-01-16T21:34:00.624500
Shan
pythondev_help_Shan_2019-01-16T21:34:00.624500
1,547,674,440.6245
2,857
pythondev
help
like, `k = 'None'`
2019-01-16T21:34:06.624800
Shan
pythondev_help_Shan_2019-01-16T21:34:06.624800
1,547,674,446.6248
2,858
pythondev
help
or. you can simply not deal with that data by ignoring it.
2019-01-16T21:34:33.625600
Shan
pythondev_help_Shan_2019-01-16T21:34:33.625600
1,547,674,473.6256
2,859
pythondev
help
am getting these keys and values from an excel sheet which is columns and rows
2019-01-16T21:34:35.625700
Hai
pythondev_help_Hai_2019-01-16T21:34:35.625700
1,547,674,475.6257
2,860
pythondev
help
None
2019-01-16T21:44:09.625800
Hai
pythondev_help_Hai_2019-01-16T21:44:09.625800
1,547,675,049.6258
2,861
pythondev
help
iterate through `b` and if the value is null, overwrite the value.
2019-01-16T21:46:50.626400
Shan
pythondev_help_Shan_2019-01-16T21:46:50.626400
1,547,675,210.6264
2,862
pythondev
help
how??
2019-01-16T21:48:07.626600
Hai
pythondev_help_Hai_2019-01-16T21:48:07.626600
1,547,675,287.6266
2,863
pythondev
help
leveraging a similar loop like i provided above.
2019-01-16T21:48:31.626900
Shan
pythondev_help_Shan_2019-01-16T21:48:31.626900
1,547,675,311.6269
2,864
pythondev
help
None
2019-01-16T21:50:02.627200
Hai
pythondev_help_Hai_2019-01-16T21:50:02.627200
1,547,675,402.6272
2,865
pythondev
help
```&gt;&gt;&gt; foo = {'my_key': ''} &gt;&gt;&gt; for k, v in foo.items(): ... if not v: ... v = "temp" ... foo[k] = v ... &gt;&gt;&gt; foo {'my_key': 'temp'}```
2019-01-16T21:53:21.627700
Shan
pythondev_help_Shan_2019-01-16T21:53:21.627700
1,547,675,601.6277
2,866
pythondev
help
alright I will try and let you know. Thanks a lot <@Shan>
2019-01-16T21:55:56.628200
Hai
pythondev_help_Hai_2019-01-16T21:55:56.628200
1,547,675,756.6282
2,867
pythondev
help
I've got this script (django management command) that is wrapped in a `While True:` loop so that it can run indefinitely. I want to move this script up to my server and schedule it as a cronjob. The script very occasionally fails. I was thinking of having the cronjob run every hour or two hours, but only execute if the...
2019-01-16T22:00:40.629700
Maricruz
pythondev_help_Maricruz_2019-01-16T22:00:40.629700
1,547,676,040.6297
2,868
pythondev
help
How would I go about doing that? Create a lock file?
2019-01-16T22:00:52.630000
Maricruz
pythondev_help_Maricruz_2019-01-16T22:00:52.630000
1,547,676,052.63
2,869
pythondev
help
Here's the code snippet I'm looking at:
2019-01-16T22:01:05.630300
Maricruz
pythondev_help_Maricruz_2019-01-16T22:01:05.630300
1,547,676,065.6303
2,870
pythondev
help
None
2019-01-16T22:01:22.630400
Maricruz
pythondev_help_Maricruz_2019-01-16T22:01:22.630400
1,547,676,082.6304
2,871
pythondev
help
<@Maricruz> yeah, a lock file is usually the solution
2019-01-16T22:49:22.631900
Chester
pythondev_help_Chester_2019-01-16T22:49:22.631900
1,547,678,962.6319
2,872
pythondev
help
btw, your exception handing code is weird
2019-01-16T22:49:30.632200
Chester
pythondev_help_Chester_2019-01-16T22:49:30.632200
1,547,678,970.6322
2,873
pythondev
help
replace ``` except Exception as e: if str(e) != 'KeyboardInterrupt': ``` with ``` except KeyboardInterrupt: pass except Exception as e: ... # rest of your code ```
2019-01-16T22:50:27.633400
Chester
pythondev_help_Chester_2019-01-16T22:50:27.633400
1,547,679,027.6334
2,874
pythondev
help
<@Nenita> Will something like this work?
2019-01-16T22:58:12.634200
Marth
pythondev_help_Marth_2019-01-16T22:58:12.634200
1,547,679,492.6342
2,875
pythondev
help
None
2019-01-16T22:58:36.634300
Marth
pythondev_help_Marth_2019-01-16T22:58:36.634300
1,547,679,516.6343
2,876
pythondev
help
You'll end up with a dict that looks like this:
2019-01-16T22:59:38.634900
Marth
pythondev_help_Marth_2019-01-16T22:59:38.634900
1,547,679,578.6349
2,877
pythondev
help
that would work. I've been working on many projects for a good few months now and my goal currently with this project is to have as little/short code as possible.
2019-01-16T23:01:24.636400
Nenita
pythondev_help_Nenita_2019-01-16T23:01:24.636400
1,547,679,684.6364
2,878
pythondev
help
but I also experiment to see what i could get away with and if it'd work right
2019-01-16T23:04:43.637900
Nenita
pythondev_help_Nenita_2019-01-16T23:04:43.637900
1,547,679,883.6379
2,879
pythondev
help
<@Chester> thanks - I'm gonna change that and thanks for the lock file confirmation :taco:
2019-01-16T23:21:22.638700
Maricruz
pythondev_help_Maricruz_2019-01-16T23:21:22.638700
1,547,680,882.6387
2,880
pythondev
help
I have two folders with content in it. So one is a dependency folder and the other is the the folder that holds content, is there a way to connect the two in git? Or do I have to have them in the same folder?
2019-01-17T04:05:21.641300
Arturo
pythondev_help_Arturo_2019-01-17T04:05:21.641300
1,547,697,921.6413
2,881
pythondev
help
:thinking_face:
2019-01-17T04:14:45.641500
Jettie
pythondev_help_Jettie_2019-01-17T04:14:45.641500
1,547,698,485.6415
2,882
pythondev
help
wut?
2019-01-17T04:15:03.641800
Jettie
pythondev_help_Jettie_2019-01-17T04:15:03.641800
1,547,698,503.6418
2,883
pythondev
help
<@Arturo> have both folders in one folder
2019-01-17T10:09:12.644600
Hiroko
pythondev_help_Hiroko_2019-01-17T10:09:12.644600
1,547,719,752.6446
2,884
pythondev
help
parent folder is a git repo
2019-01-17T10:09:18.644800
Hiroko
pythondev_help_Hiroko_2019-01-17T10:09:18.644800
1,547,719,758.6448
2,885
pythondev
help
#profit
2019-01-17T10:09:22.645100
Hiroko
pythondev_help_Hiroko_2019-01-17T10:09:22.645100
1,547,719,762.6451
2,886
pythondev
help
cool thanks, have done that
2019-01-17T10:46:45.645600
Arturo
pythondev_help_Arturo_2019-01-17T10:46:45.645600
1,547,722,005.6456
2,887
pythondev
help
<@Marth> I'm going to try that today and see how the output will work with the rest of my code
2019-01-17T10:59:46.646400
Nenita
pythondev_help_Nenita_2019-01-17T10:59:46.646400
1,547,722,786.6464
2,888
pythondev
help
<@Marth> looks perfect when converted to a df. Thanks.
2019-01-17T11:11:55.647400
Nenita
pythondev_help_Nenita_2019-01-17T11:11:55.647400
1,547,723,515.6474
2,889
pythondev
help
Hi all
2019-01-17T11:16:58.647600
Landon
pythondev_help_Landon_2019-01-17T11:16:58.647600
1,547,723,818.6476
2,890
pythondev
help
So, I have a backend ready with API's and database, what python framework can I use to develop the frontend only? I have the HTML/CSS ready as well. I tried Django but it seems like you have to do the api and backend as part of a django project
2019-01-17T11:18:25.649100
Landon
pythondev_help_Landon_2019-01-17T11:18:25.649100
1,547,723,905.6491
2,891
pythondev
help
what do you mean frontend? Python frameworks are for backend
2019-01-17T11:20:39.649500
Mica
pythondev_help_Mica_2019-01-17T11:20:39.649500
1,547,724,039.6495
2,892
pythondev
help
a frontend framework would be something like Vue or React
2019-01-17T11:20:59.650000
Mica
pythondev_help_Mica_2019-01-17T11:20:59.650000
1,547,724,059.65
2,893
pythondev
help
Hi Jabob, the web application part of the project( what the user will interact with) yes like Vue, but is there a Python framework similar to Vue?
2019-01-17T11:23:34.651200
Landon
pythondev_help_Landon_2019-01-17T11:23:34.651200
1,547,724,214.6512
2,894
pythondev
help
yeah, but would not advise that
2019-01-17T11:23:50.651800
Hiroko
pythondev_help_Hiroko_2019-01-17T11:23:50.651800
1,547,724,230.6518
2,895
pythondev
help
because going from python to js means lots of leaky abstractions and less-than-optimal performance
2019-01-17T11:24:14.652400
Hiroko
pythondev_help_Hiroko_2019-01-17T11:24:14.652400
1,547,724,254.6524
2,896
pythondev
help
Its not a new project, like mentioned, the backend and API's all is in place, but I want to redo the admin website
2019-01-17T11:24:44.653100
Landon
pythondev_help_Landon_2019-01-17T11:24:44.653100
1,547,724,284.6531
2,897
pythondev
help
also, consider if you’re trying to do something that transpiler framework doesn’t support
2019-01-17T11:24:46.653200
Hiroko
pythondev_help_Hiroko_2019-01-17T11:24:46.653200
1,547,724,286.6532
2,898
pythondev
help
you’re pretty much stuck and have to hack around.
2019-01-17T11:25:05.653600
Hiroko
pythondev_help_Hiroko_2019-01-17T11:25:05.653600
1,547,724,305.6536
2,899
pythondev
help
GWT is a similar project for java to webapps, and its… not good
2019-01-17T11:25:25.654200
Hiroko
pythondev_help_Hiroko_2019-01-17T11:25:25.654200
1,547,724,325.6542
2,900
pythondev
help
would that be something like Flask and Jinja?
2019-01-17T11:25:58.655100
Mica
pythondev_help_Mica_2019-01-17T11:25:58.655100
1,547,724,358.6551
2,901
pythondev
help
so its either starting the whole project from scratch using say Django or use Vue with the current backend and API's?
2019-01-17T11:26:05.655500
Landon
pythondev_help_Landon_2019-01-17T11:26:05.655500
1,547,724,365.6555
2,902
pythondev
help
I'm not really sure what a frontend python would look like
2019-01-17T11:26:17.655800
Mica
pythondev_help_Mica_2019-01-17T11:26:17.655800
1,547,724,377.6558
2,903
pythondev
help
check out <https://hackernoon.com/reconciling-djangos-mvc-templates-with-react-components-3aa986cf510a>
2019-01-17T11:28:09.656800
Hiroko
pythondev_help_Hiroko_2019-01-17T11:28:09.656800
1,547,724,489.6568
2,904
pythondev
help
<@Mica>, its not a Python frontend as such......I just want to use Python in the current HTML/CSS template I have to communicate to an existing REST API, dont know if this make sense
2019-01-17T11:28:26.657200
Landon
pythondev_help_Landon_2019-01-17T11:28:26.657200
1,547,724,506.6572
2,905
pythondev
help
you can’t sorry
2019-01-17T11:28:36.657500
Hiroko
pythondev_help_Hiroko_2019-01-17T11:28:36.657500
1,547,724,516.6575
2,906
pythondev
help
if you want that in the browser, you need js to talk to your django server
2019-01-17T11:28:53.658100
Hiroko
pythondev_help_Hiroko_2019-01-17T11:28:53.658100
1,547,724,533.6581
2,907
pythondev
help
which is via ajax calls
2019-01-17T11:29:07.658500
Hiroko
pythondev_help_Hiroko_2019-01-17T11:29:07.658500
1,547,724,547.6585
2,908
pythondev
help
<@Hiroko> thank you. the backend server is mysql with MuleSoft delivering the REST API's. so for instance I thought ill be able to create the login page in html/css and once the user clicks on the login button ill connect to the REST API for the validation etc, but in a Django type of way within my HTML
2019-01-17T11:32:00.660300
Landon
pythondev_help_Landon_2019-01-17T11:32:00.660300
1,547,724,720.6603
2,909
pythondev
help
If you already have a working api there is no reason to add django into the mix. It would just be a _very_ heavy way of serving html/css/js
2019-01-17T11:33:08.661000
Clemmie
pythondev_help_Clemmie_2019-01-17T11:33:08.661000
1,547,724,788.661
2,910
pythondev
help
<@Clemmie>, yeah for sure, but is there a python web framework that can be used to do this?
2019-01-17T11:34:35.661800
Landon
pythondev_help_Landon_2019-01-17T11:34:35.661800
1,547,724,875.6618
2,911
pythondev
help
No. you need javascript.
2019-01-17T11:35:08.662500
Clemmie
pythondev_help_Clemmie_2019-01-17T11:35:08.662500
1,547,724,908.6625
2,912
pythondev
help
yeah so either go with Vue or .NET etc...ok all, thank you for your advise
2019-01-17T11:35:50.663200
Landon
pythondev_help_Landon_2019-01-17T11:35:50.663200
1,547,724,950.6632
2,913
pythondev
help
nope, not .NET - that is C++
2019-01-17T11:36:03.663500
Clemmie
pythondev_help_Clemmie_2019-01-17T11:36:03.663500
1,547,724,963.6635
2,914
pythondev
help
(or C#, I forget)
2019-01-17T11:36:14.663800
Clemmie
pythondev_help_Clemmie_2019-01-17T11:36:14.663800
1,547,724,974.6638
2,915
pythondev
help
C#
2019-01-17T11:36:20.664000
Landon
pythondev_help_Landon_2019-01-17T11:36:20.664000
1,547,724,980.664
2,916
pythondev
help
You can do native javascript (ES5/6), React, Angular, Vue, or Ember basically
2019-01-17T11:36:56.664700
Clemmie
pythondev_help_Clemmie_2019-01-17T11:36:56.664700
1,547,725,016.6647
2,917
pythondev
help
ok kewl.....now to learn JS
2019-01-17T11:37:10.665000
Landon
pythondev_help_Landon_2019-01-17T11:37:10.665000
1,547,725,030.665
2,918
pythondev
help
or do everything from scratch with Django
2019-01-17T11:38:40.665400
Landon
pythondev_help_Landon_2019-01-17T11:38:40.665400
1,547,725,120.6654
2,919
pythondev
help
Even if you do it all from scratch in django, if you want it to be api based, you will still need javascript
2019-01-17T11:39:52.666200
Clemmie
pythondev_help_Clemmie_2019-01-17T11:39:52.666200
1,547,725,192.6662
2,920