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 | <@Coleen> within python, or outside of it? if within python, do you have the entire file loaded yet, or are you looking to read the file and only return that segment?
For the latter, something like this:
```
first_marker='from here'
last_marker='to here'
with open('filename', 'r') as file_with_important_st... | 2019-01-28T12:14:40.815000 | Kiera | pythondev_help_Kiera_2019-01-28T12:14:40.815000 | 1,548,677,680.815 | 4,721 |
pythondev | help | grr, slack hadn't updated and i didn't realize it had already been answered. | 2019-01-28T12:15:57.815300 | Kiera | pythondev_help_Kiera_2019-01-28T12:15:57.815300 | 1,548,677,757.8153 | 4,722 |
pythondev | help | I’m not familiar with Paramiko but I think what you’re doing is sending raw data to the socket instead of getting a pty to send data to. The docs for `invoke_shell` imply you’d need to ask for a pty first: <http://docs.paramiko.org/en/2.4/api/channel.html#paramiko.channel.Channel.invoke_shell> | 2019-01-28T12:27:13.815600 | Carrol | pythondev_help_Carrol_2019-01-28T12:27:13.815600 | 1,548,678,433.8156 | 4,723 |
pythondev | help | You might want to look at Fabric which probably has a friendlier API than Paramiko (which it uses for the SSH operations) <https://www.fabfile.org> | 2019-01-28T12:31:30.815800 | Carrol | pythondev_help_Carrol_2019-01-28T12:31:30.815800 | 1,548,678,690.8158 | 4,724 |
pythondev | help | anyone got pexpect/pxssh to work with windows ? | 2019-01-28T12:58:07.816700 | Nenita | pythondev_help_Nenita_2019-01-28T12:58:07.816700 | 1,548,680,287.8167 | 4,725 |
pythondev | help | I don't know what to google to find a solution to my problem, but running my code line by line will print the entire output whereas if I just run it straight, it outputs only the first line? | 2019-01-28T13:20:05.818000 | Nenita | pythondev_help_Nenita_2019-01-28T13:20:05.818000 | 1,548,681,605.818 | 4,726 |
pythondev | help | sounds like an uncaught silent exception | 2019-01-28T13:20:58.818300 | Hiroko | pythondev_help_Hiroko_2019-01-28T13:20:58.818300 | 1,548,681,658.8183 | 4,727 |
pythondev | help | I can't even figure out how to debug this properly because I can't figure out what's going on | 2019-01-28T13:23:59.818900 | Nenita | pythondev_help_Nenita_2019-01-28T13:23:59.818900 | 1,548,681,839.8189 | 4,728 |
pythondev | help | got it | 2019-01-28T13:25:35.819900 | Nenita | pythondev_help_Nenita_2019-01-28T13:25:35.819900 | 1,548,681,935.8199 | 4,729 |
pythondev | help | Maybe a timeout issue where lines aren't waiting for network responses if run together, but the slowness of a manual process gives them extra time? | 2019-01-28T13:25:36.820100 | Sasha | pythondev_help_Sasha_2019-01-28T13:25:36.820100 | 1,548,681,936.8201 | 4,730 |
pythondev | help | you are correct sir | 2019-01-28T13:25:43.820300 | Nenita | pythondev_help_Nenita_2019-01-28T13:25:43.820300 | 1,548,681,943.8203 | 4,731 |
pythondev | help | adding time.sleep did the trick | 2019-01-28T13:25:50.820600 | Nenita | pythondev_help_Nenita_2019-01-28T13:25:50.820600 | 1,548,681,950.8206 | 4,732 |
pythondev | help | just confirmed it too. thanks for the support. don't mean to be spamming the chat like this. | 2019-01-28T13:26:15.821100 | Nenita | pythondev_help_Nenita_2019-01-28T13:26:15.821100 | 1,548,681,975.8211 | 4,733 |
pythondev | help | Hiya folks, anyone else ever ran into issues using SQL-Alchemy, Flask, and wtforms trying to pre-populate a querySelectField? (all other fields preopulate for example Selectfield except the queryselects?) | 2019-01-28T14:06:23.822500 | Lydia | pythondev_help_Lydia_2019-01-28T14:06:23.822500 | 1,548,684,383.8225 | 4,734 |
pythondev | help | you might find better results if you describe what you’re doing along with the code | 2019-01-28T14:08:33.823000 | Hiroko | pythondev_help_Hiroko_2019-01-28T14:08:33.823000 | 1,548,684,513.823 | 4,735 |
pythondev | help | as is, hard to say what’s going on | 2019-01-28T14:08:45.823300 | Hiroko | pythondev_help_Hiroko_2019-01-28T14:08:45.823300 | 1,548,684,525.8233 | 4,736 |
pythondev | help | Looking for some help with twisted. I have a python config file that I use when starting a twistd server to serve static content and django app. It's currently running on 80 and 443 but I need to change this to just tcp 8080 because we now do authentication through siteminder and apache, which needs to be on those port... | 2019-01-28T14:42:05.826400 | Maricela | pythondev_help_Maricela_2019-01-28T14:42:05.826400 | 1,548,686,525.8264 | 4,737 |
pythondev | help | ```with smtplib.SMTP('<http://aspmx.l.google.com|aspmx.l.google.com>') as smtp:
print(smtp.docmd('helo hi'))
``` | 2019-01-28T14:52:13.827300 | Sondra | pythondev_help_Sondra_2019-01-28T14:52:13.827300 | 1,548,687,133.8273 | 4,738 |
pythondev | help | Probably stupid question: when installing Python 3.7, do I need to use the execute the "Install Certificates.command" when on a windows machine? | 2019-01-28T15:26:40.831200 | Sylvie | pythondev_help_Sylvie_2019-01-28T15:26:40.831200 | 1,548,689,200.8312 | 4,739 |
pythondev | help | What is that? I've been installing Python on Windows for many years and this is the first I've heard of such a thing | 2019-01-28T15:30:11.831700 | Raven | pythondev_help_Raven_2019-01-28T15:30:11.831700 | 1,548,689,411.8317 | 4,740 |
pythondev | help | Probably a Mac thing... | 2019-01-28T15:32:58.832000 | Sylvie | pythondev_help_Sylvie_2019-01-28T15:32:58.832000 | 1,548,689,578.832 | 4,741 |
pythondev | help | it is | 2019-01-28T15:33:02.832200 | Hiroko | pythondev_help_Hiroko_2019-01-28T15:33:02.832200 | 1,548,689,582.8322 | 4,742 |
pythondev | help | you doing it with brew? | 2019-01-28T15:33:06.832400 | Hiroko | pythondev_help_Hiroko_2019-01-28T15:33:06.832400 | 1,548,689,586.8324 | 4,743 |
pythondev | help | <https://stackoverflow.com/questions/44649449/brew-installation-of-python-3-6-1-ssl-certificate-verify-failed-certificate> | 2019-01-28T15:33:11.832800 | Hiroko | pythondev_help_Hiroko_2019-01-28T15:33:11.832800 | 1,548,689,591.8328 | 4,744 |
pythondev | help | Thanks for the help! | 2019-01-28T15:33:38.833500 | Sylvie | pythondev_help_Sylvie_2019-01-28T15:33:38.833500 | 1,548,689,618.8335 | 4,745 |
pythondev | help | I always found Python on Mac a bit awkward. I think I ended up with 3 separate runtimes for some reason | 2019-01-28T15:34:43.834200 | Raven | pythondev_help_Raven_2019-01-28T15:34:43.834200 | 1,548,689,683.8342 | 4,746 |
pythondev | help | pyenv has helped alot | 2019-01-28T15:35:08.834900 | Hiroko | pythondev_help_Hiroko_2019-01-28T15:35:08.834900 | 1,548,689,708.8349 | 4,747 |
pythondev | help | There always the option to build pyenv directly | 2019-01-28T15:35:18.835100 | Gemma | pythondev_help_Gemma_2019-01-28T15:35:18.835100 | 1,548,689,718.8351 | 4,748 |
pythondev | help | (rather than through Homebrew) | 2019-01-28T15:35:37.835300 | Gemma | pythondev_help_Gemma_2019-01-28T15:35:37.835300 | 1,548,689,737.8353 | 4,749 |
pythondev | help | Hi all! I’m new here so if this isn’t the place to ask something like this, please let me know!
I am working on a problem from <http://CodeWars.com|CodeWars.com> and my algorithm implementation is not fast enough. Would anyone here mind looking through my implementation and suggesting improvements? Codes ~40 lines | 2019-01-28T15:44:55.837300 | Lamont | pythondev_help_Lamont_2019-01-28T15:44:55.837300 | 1,548,690,295.8373 | 4,750 |
pythondev | help | <@Lamont> go ahead and paste your code here. (use the + button and choose ‘code or text snippet’) | 2019-01-28T15:48:04.838200 | Carrol | pythondev_help_Carrol_2019-01-28T15:48:04.838200 | 1,548,690,484.8382 | 4,751 |
pythondev | help | Here’s the prompt:
”
Given a positive number n > 1 find the prime factor decomposition of n. The result will be a string with the following form :
“(p1**n1)(p2**n2)...(pk**nk)”
with the p(i) in increasing order and n(i) empty if n(i) is 1.
Example: n = 86240 should return “(2**5)(5)(7**2)(11)”
” | 2019-01-28T15:48:47.838600 | Lamont | pythondev_help_Lamont_2019-01-28T15:48:47.838600 | 1,548,690,527.8386 | 4,752 |
pythondev | help | My workflow is to find the primes (starting with primes smaller than 50) and dividing the provided number, n, by primes, recording the number of times n is divided by each prime. I then use these recorded numbers in the return | 2019-01-28T15:50:38.838900 | Lamont | pythondev_help_Lamont_2019-01-28T15:50:38.838900 | 1,548,690,638.8389 | 4,753 |
pythondev | help | My current thinking is that, while it passes the provided test case, it may be stalling during the while loop “while n > 1:“, for an edge case, such as when n is divided multiple consecutive times by a single prime, in the while loop “while n % prime == 0:” | 2019-01-28T15:53:56.840900 | Lamont | pythondev_help_Lamont_2019-01-28T15:53:56.840900 | 1,548,690,836.8409 | 4,754 |
pythondev | help | If you're not sure if it's stalling or not, one first step would be to find out. You could consider adding something like `print(n)` inside the loop. (Not sure if printing works on CodeWars, but if not, that's a good reason to try the code on your own machine, perhaps) | 2019-01-28T15:57:01.842200 | Raven | pythondev_help_Raven_2019-01-28T15:57:01.842200 | 1,548,691,021.8422 | 4,755 |
pythondev | help | Thanks <@Raven>, I’ll give that a go. I’m also pretty sure that large while loop “while N > 1:” has the greatest time complexity out of my whole algo, so I’m going to try to condense it and see if that helps | 2019-01-28T15:59:04.843800 | Lamont | pythondev_help_Lamont_2019-01-28T15:59:04.843800 | 1,548,691,144.8438 | 4,756 |
pythondev | help | Minor code clarity hint - you don't need an `if` outside a `while` with the same condition | 2019-01-28T16:00:49.844300 | Raven | pythondev_help_Raven_2019-01-28T16:00:49.844300 | 1,548,691,249.8443 | 4,757 |
pythondev | help | It's also not clear why you would regenerate the primes list, since most of the contents aren't going to change between calls. If you really do need to expand the list as you go along, just calculate from the end onwards | 2019-01-28T16:02:54.846800 | Raven | pythondev_help_Raven_2019-01-28T16:02:54.846800 | 1,548,691,374.8468 | 4,758 |
pythondev | help | Yeah, I debated putting that “if” statement there but decided on including it, in order to make it easy to break out of the for-loop after n is divided by the given prime number the maximum number of times. This was an attempt to let the algo break out of the for-loop after factoring that prime number out of n | 2019-01-28T16:03:18.847100 | Lamont | pythondev_help_Lamont_2019-01-28T16:03:18.847100 | 1,548,691,398.8471 | 4,759 |
pythondev | help | I could do that by converting getPrimes into a generator | 2019-01-28T16:03:49.847600 | Lamont | pythondev_help_Lamont_2019-01-28T16:03:49.847600 | 1,548,691,429.8476 | 4,760 |
pythondev | help | Ah, I see. I guess it's times like this I wish Python had a do..while loop. | 2019-01-28T16:05:07.848600 | Raven | pythondev_help_Raven_2019-01-28T16:05:07.848600 | 1,548,691,507.8486 | 4,761 |
pythondev | help | Without wanting to disturb things too much, you might also consider a recursive approach, starting with the largest prime smaller than `n` and working downwards until you find an integer factor, and then you can repeat the process for each of those, etc | 2019-01-28T16:10:42.849800 | Raven | pythondev_help_Raven_2019-01-28T16:10:42.849800 | 1,548,691,842.8498 | 4,762 |
pythondev | help | I was just thinking something along the lines, working from larger to smaller prime factors. Great idea — I’ll give it a shot now! | 2019-01-28T16:12:23.850400 | Lamont | pythondev_help_Lamont_2019-01-28T16:12:23.850400 | 1,548,691,943.8504 | 4,763 |
pythondev | help | Turns out the solution is to just iterate i from 1 to n, checking if n is divisible by i. If it is, include it in the answer. Any non-prime i will be disregarded as it is a multiple of a smaller prime, of which n is not divisible | 2019-01-28T16:53:11.853300 | Lamont | pythondev_help_Lamont_2019-01-28T16:53:11.853300 | 1,548,694,391.8533 | 4,764 |
pythondev | help | Although you can terminate at sqrt(n). Anything larger must be prime. | 2019-01-28T17:35:23.855900 | Sasha | pythondev_help_Sasha_2019-01-28T17:35:23.855900 | 1,548,696,923.8559 | 4,765 |
pythondev | help | Optimization: You can iterate over odds greater than 2, since 2 is the only positive even number that's also a prime. | 2019-01-28T17:43:04.856600 | Carmen | pythondev_help_Carmen_2019-01-28T17:43:04.856600 | 1,548,697,384.8566 | 4,766 |
pythondev | help | Pro-tip: Read the code if it's available, don't just comment on text descriptions of solutions. Then you don't look like a dunce like me when the optimization you mention was already there. | 2019-01-28T17:46:39.859600 | Carmen | pythondev_help_Carmen_2019-01-28T17:46:39.859600 | 1,548,697,599.8596 | 4,767 |
pythondev | help | Yep, getPrimes() stops at n**0.5+1 and returns only primes, removing any evens | 2019-01-28T17:47:02.860000 | Lamont | pythondev_help_Lamont_2019-01-28T17:47:02.860000 | 1,548,697,622.86 | 4,768 |
pythondev | help | :joy: love it, <@Carmen>. Still, thanks a ton for taking the time to look into my code! | 2019-01-28T17:47:34.860600 | Lamont | pythondev_help_Lamont_2019-01-28T17:47:34.860600 | 1,548,697,654.8606 | 4,769 |
pythondev | help | My newest DL model on Diabetes:
<https://github.com/paulgureghian/Deep_Learning_with_Keras/blob/master/AI_Diabetes_Keras_NN.ipynb> | 2019-01-28T18:24:02.861100 | Clayton | pythondev_help_Clayton_2019-01-28T18:24:02.861100 | 1,548,699,842.8611 | 4,770 |
pythondev | help | None | 2019-01-28T20:06:37.861600 | Hai | pythondev_help_Hai_2019-01-28T20:06:37.861600 | 1,548,705,997.8616 | 4,771 |
pythondev | help | <@Sasha> | 2019-01-28T20:07:19.862000 | Hai | pythondev_help_Hai_2019-01-28T20:07:19.862000 | 1,548,706,039.862 | 4,772 |
pythondev | help | What you've posted doesn't make a lot of sense, <@Hai>. Are you calling `A1.read_json()` somewhere? | 2019-01-28T20:10:42.862800 | Sasha | pythondev_help_Sasha_2019-01-28T20:10:42.862800 | 1,548,706,242.8628 | 4,773 |
pythondev | help | not am not calling am just calling the read_file() | 2019-01-28T20:11:02.863200 | Hai | pythondev_help_Hai_2019-01-28T20:11:02.863200 | 1,548,706,262.8632 | 4,774 |
pythondev | help | so if i call read_file() it just reads the file | 2019-01-28T20:11:36.863700 | Hai | pythondev_help_Hai_2019-01-28T20:11:36.863700 | 1,548,706,296.8637 | 4,775 |
pythondev | help | So what line is throwing the error? | 2019-01-28T20:11:40.863900 | Sasha | pythondev_help_Sasha_2019-01-28T20:11:40.863900 | 1,548,706,300.8639 | 4,776 |
pythondev | help | A1 = pd.read_json('file1.json', lines=True) | 2019-01-28T20:11:52.864100 | Hai | pythondev_help_Hai_2019-01-28T20:11:52.864100 | 1,548,706,312.8641 | 4,777 |
pythondev | help | line 5th | 2019-01-28T20:11:57.864300 | Hai | pythondev_help_Hai_2019-01-28T20:11:57.864300 | 1,548,706,317.8643 | 4,778 |
pythondev | help | What is `pd` here? | 2019-01-28T20:12:10.864600 | Sasha | pythondev_help_Sasha_2019-01-28T20:12:10.864600 | 1,548,706,330.8646 | 4,779 |
pythondev | help | import pandas as pd | 2019-01-28T20:12:18.864900 | Hai | pythondev_help_Hai_2019-01-28T20:12:18.864900 | 1,548,706,338.8649 | 4,780 |
pythondev | help | So I think it wants a more complicated thing for the first parameter, either a file object or a full path specification, not just a filename. | 2019-01-28T20:14:16.865500 | Sasha | pythondev_help_Sasha_2019-01-28T20:14:16.865500 | 1,548,706,456.8655 | 4,781 |
pythondev | help | how would i give that? am giving the file name. the file is in the local itself | 2019-01-28T20:15:57.867100 | Hai | pythondev_help_Hai_2019-01-28T20:15:57.867100 | 1,548,706,557.8671 | 4,782 |
pythondev | help | Checking... I may be mistaken, as a lot of examples just use a filename. Is there any chance that the error is coming from the JSON parsing itself, i.e. could the JSON in the file be invalid? | 2019-01-28T20:20:57.868500 | Sasha | pythondev_help_Sasha_2019-01-28T20:20:57.868500 | 1,548,706,857.8685 | 4,783 |
pythondev | help | Can you post the full traceback? | 2019-01-28T20:21:15.868700 | Sasha | pythondev_help_Sasha_2019-01-28T20:21:15.868700 | 1,548,706,875.8687 | 4,784 |
pythondev | help | it is valid. if i run it in my local am not getting any error. I containerized the script and running the container with this script. | 2019-01-28T20:23:36.870000 | Hai | pythondev_help_Hai_2019-01-28T20:23:36.870000 | 1,548,707,016.87 | 4,785 |
pythondev | help | Are you sure the container has the files present and in the correct directory? | 2019-01-28T20:25:16.870400 | Sasha | pythondev_help_Sasha_2019-01-28T20:25:16.870400 | 1,548,707,116.8704 | 4,786 |
pythondev | help | You might try `A1 = pd.read_json(open('file1.json', 'r'), lines=True)` to more directly read the file, to see if it works or gives you a different error. | 2019-01-28T20:26:41.871100 | Sasha | pythondev_help_Sasha_2019-01-28T20:26:41.871100 | 1,548,707,201.8711 | 4,787 |
pythondev | help | yes the files are inside the container and they are accessible because. yaa i will try that now and let you know | 2019-01-28T20:29:04.872100 | Hai | pythondev_help_Hai_2019-01-28T20:29:04.872100 | 1,548,707,344.8721 | 4,788 |
pythondev | help | hello, looking for some Django help. I am stuck trying to figure out how to have a form which only takes two fields as input, but requires about 4 other fields to be included by default. | 2019-01-28T20:51:18.873400 | Janella | pythondev_help_Janella_2019-01-28T20:51:18.873400 | 1,548,708,678.8734 | 4,789 |
pythondev | help | would i included those default values in the view.py?? | 2019-01-28T20:52:12.874100 | Janella | pythondev_help_Janella_2019-01-28T20:52:12.874100 | 1,548,708,732.8741 | 4,790 |
pythondev | help | <@Sasha> i got the dfferent error no such file or directory 'file1.json' | 2019-01-28T20:53:21.875500 | Hai | pythondev_help_Hai_2019-01-28T20:53:21.875500 | 1,548,708,801.8755 | 4,791 |
pythondev | help | do i needto give the full path? but the file is in the container itself and has all the persmissions | 2019-01-28T20:53:57.876400 | Hai | pythondev_help_Hai_2019-01-28T20:53:57.876400 | 1,548,708,837.8764 | 4,792 |
pythondev | help | doesn’t matter.. think of the container as a vm | 2019-01-28T20:54:11.876700 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:54:11.876700 | 1,548,708,851.8767 | 4,793 |
pythondev | help | virtual machine | 2019-01-28T20:54:16.877000 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:54:16.877000 | 1,548,708,856.877 | 4,794 |
pythondev | help | you’re telling it “I want to open this file” and assuming it has everything it needs | 2019-01-28T20:54:33.877400 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:54:33.877400 | 1,548,708,873.8774 | 4,795 |
pythondev | help | but that’s an incorrect assumption. provide the file path with the file name | 2019-01-28T20:54:45.877900 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:54:45.877900 | 1,548,708,885.8779 | 4,796 |
pythondev | help | <@Hiroko> ohh okay i will try now. | 2019-01-28T20:55:08.878600 | Hai | pythondev_help_Hai_2019-01-28T20:55:08.878600 | 1,548,708,908.8786 | 4,797 |
pythondev | help | that’s like you having a file in some data folder, and trying to execute a program in the root | 2019-01-28T20:55:16.878900 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:55:16.878900 | 1,548,708,916.8789 | 4,798 |
pythondev | help | ohh | 2019-01-28T20:55:24.879300 | Hai | pythondev_help_Hai_2019-01-28T20:55:24.879300 | 1,548,708,924.8793 | 4,799 |
pythondev | help | but assuming the program already knows where that file is | 2019-01-28T20:55:28.879400 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:55:28.879400 | 1,548,708,928.8794 | 4,800 |
pythondev | help | yeahh i will try now giving the fullpath | 2019-01-28T20:56:03.879900 | Hai | pythondev_help_Hai_2019-01-28T20:56:03.879900 | 1,548,708,963.8799 | 4,801 |
pythondev | help | :thumbsup: | 2019-01-28T20:57:47.880100 | Hiroko | pythondev_help_Hiroko_2019-01-28T20:57:47.880100 | 1,548,709,067.8801 | 4,802 |
pythondev | help | yeahh it worked. <@Hiroko> <@Sasha> thank you so much guys really appreciate it. | 2019-01-28T20:59:16.880700 | Hai | pythondev_help_Hai_2019-01-28T20:59:16.880700 | 1,548,709,156.8807 | 4,803 |
pythondev | help | :slightly_smiling_face: | 2019-01-28T21:00:48.881100 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:00:48.881100 | 1,548,709,248.8811 | 4,804 |
pythondev | help | <@Hiroko> <@Sasha> it worked for one time but again it showing the same error i didnt change anything. again same error ValueError: Expected object or value | 2019-01-28T21:25:45.882400 | Hai | pythondev_help_Hai_2019-01-28T21:25:45.882400 | 1,548,710,745.8824 | 4,805 |
pythondev | help | error in this line A1 = pd.read_json(open('file1.json', 'r'), lines=True) | 2019-01-28T21:26:14.882900 | Hai | pythondev_help_Hai_2019-01-28T21:26:14.882900 | 1,548,710,774.8829 | 4,806 |
pythondev | help | am wondering how can it works like this. it worked for the first time and then later showing the same error | 2019-01-28T21:26:48.883500 | Hai | pythondev_help_Hai_2019-01-28T21:26:48.883500 | 1,548,710,808.8835 | 4,807 |
pythondev | help | This line doesn't show any file path... | 2019-01-28T21:27:07.884000 | Sasha | pythondev_help_Sasha_2019-01-28T21:27:07.884000 | 1,548,710,827.884 | 4,808 |
pythondev | help | and you _really_ should use a context manager | 2019-01-28T21:27:42.884500 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:27:42.884500 | 1,548,710,862.8845 | 4,809 |
pythondev | help | eg ```with open('file_1.json', 'r') as f:
df = pd.read_json(f, lines = True)``` | 2019-01-28T21:28:15.885300 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:28:15.885300 | 1,548,710,895.8853 | 4,810 |
pythondev | help | ```def read_file():
if myfile == 'A':
A1 = pd.read_json('file1.json', lines=True)
elif myfile == 'B':
A2 = pd.read_json('file2.json', lines=True)
elif myfile == 'C':
A3 = pd.read_json('file3.json', lines=True)
return myfile```
is what you wrote before | 2019-01-28T21:28:49.886000 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:28:49.886000 | 1,548,710,929.886 | 4,811 |
pythondev | help | what are `A*` because you’re not doing anything with them | 2019-01-28T21:29:02.886700 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:29:02.886700 | 1,548,710,942.8867 | 4,812 |
pythondev | help | :point_up: Yeah, the `open()` was just a quick suggestion to diagnose the problem. | 2019-01-28T21:29:06.886800 | Sasha | pythondev_help_Sasha_2019-01-28T21:29:06.886800 | 1,548,710,946.8868 | 4,813 |
pythondev | help | gotcha | 2019-01-28T21:29:11.887000 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:29:11.887000 | 1,548,710,951.887 | 4,814 |
pythondev | help | again, <@Hai> put the file path :smile: | 2019-01-28T21:29:28.887300 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:29:28.887300 | 1,548,710,968.8873 | 4,815 |
pythondev | help | `/full/path/to/file/file.json` | 2019-01-28T21:29:47.887700 | Hiroko | pythondev_help_Hiroko_2019-01-28T21:29:47.887700 | 1,548,710,987.8877 | 4,816 |
pythondev | help | yeahh i did put the file path but still the same error. pandas is not able to read the json? but am wondering how it worked for the first time?? | 2019-01-28T21:39:32.888500 | Hai | pythondev_help_Hai_2019-01-28T21:39:32.888500 | 1,548,711,572.8885 | 4,817 |
pythondev | help | <@Hiroko> <@Sasha> it worked by adding orient='records' A1 = pd.read_json('file1.json', orien='records') | 2019-01-28T22:10:23.890000 | Hai | pythondev_help_Hai_2019-01-28T22:10:23.890000 | 1,548,713,423.89 | 4,818 |
pythondev | help | That doesn't make a lot of sense. I thought you said you had successfully read these JSON files locally before. | 2019-01-28T22:11:43.890500 | Sasha | pythondev_help_Sasha_2019-01-28T22:11:43.890500 | 1,548,713,503.8905 | 4,819 |
pythondev | help | A fun Keras DL model:
<https://github.com/paulgureghian/Deep_Learning_with_Keras/blob/master/Bike_Buyer_Keras_Model.ipynb> | 2019-01-28T22:21:33.891100 | Clayton | pythondev_help_Clayton_2019-01-28T22:21:33.891100 | 1,548,714,093.8911 | 4,820 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.