Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: regular expression
Post: RE: regular expression

I'm no expert but, since what you want to retrieve are a lot of lines, maybe you can just loop through the file lines, see if '[DAT_23]' is in one line, start retrieving, and then stop when you find '...
karkas Data Science 1 617 Jul-10-2020, 06:38 AM
    Thread: matplotlib.pyplot functions create new figures instead of applying to the current one
Post: RE: matplotlib.pyplot functions create new figures...

(Jul-09-2020, 08:13 AM)Monira Wrote: i have also problem drawing a plot from a csv file on jupyter notebook....how can i do it? Please create a new thread with your issue.
karkas Data Science 2 778 Jul-09-2020, 08:32 AM
    Thread: matplotlib.pyplot functions create new figures instead of applying to the current one
Post: matplotlib.pyplot functions create new figures ins...

I'm starting to learn matplotlib, following the pyplot tutorial, but something weird—I think—is happening in the very first part. When I do this, import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4...
karkas Data Science 2 778 Jul-09-2020, 08:07 AM
    Thread: Python can't import Django and it's in the site-packages directory
Post: RE: Python can't import Django and it's in the sit...

Hi, menator. Thank you very much for your reply. I read something in the tutorial about creating the virtual environment, but I think I remember seeing it was optional. Probably I have a bigger conce...
karkas Web Scraping & Web Development 3 4,425 Feb-11-2020, 01:06 AM
    Thread: Why replace treats an integer value 999 as 999.0?
Post: RE: Why replace treats an integer value 999 as 999...

About why you are getting True when doing -999. == -999. Note that, although these two literals have different type, their actual value (binary representation) is the same, and that's what == checks. ...
karkas General Coding Help 10 1,723 Feb-10-2020, 06:06 AM
    Thread: Error: variable can not be defined
Post: RE: Error: variable can not be defined

I can't see any binding of the name "sizes" that's not in an except clause. So, if your code executes all the try blocks successfully, then you'll be trying to print a variable that doesn't exist.
karkas General Coding Help 2 1,404 Feb-09-2020, 07:30 PM
    Thread: Why replace treats an integer value 999 as 999.0?
Post: RE: Why replace treats an integer value 999 as 999...

I haven't used pandas, but what == does is test if both literals have the same binary representation, which is why it's not a good idea to use it to test float equality with it after some calculations...
karkas General Coding Help 10 1,723 Feb-09-2020, 07:03 PM
    Thread: Python can't import Django and it's in the site-packages directory
Post: Python can't import Django and it's in the site-pa...

Hello, I'm trying to play around with the Django tutorial in the Django website, but I ran into an error and don't understand why I am getting it. I found some info about it in other forums, but the ...
karkas Web Scraping & Web Development 3 4,425 Feb-09-2020, 05:15 PM
    Thread: Hi , why can't i return this value?
Post: RE: Hi , why can't i return this value?

You can also assign it to a variable name.
karkas General Coding Help 3 830 Feb-09-2020, 01:29 PM
    Thread: Error while trying to see Python version with "sys.executable"
Post: RE: Error while trying to see Python version with ...

Thank you very much. What about "the currently running notebook"?
karkas General Coding Help 5 2,134 Feb-09-2020, 01:55 AM
    Thread: Error while trying to see Python version with "sys.executable"
Post: RE: Error while trying to see Python version with ...

(Feb-08-2020, 07:57 PM)Axel_Erfurt Wrote: import sys print(sys.version) print(sys.path) Thank you very much for your reply. I did notice what sys.version outputs, but what is causing the error "'C:...
karkas General Coding Help 5 2,134 Feb-08-2020, 11:28 PM
    Thread: Struggling to exit this while loop
Post: RE: Struggling to exit this while loop

Okay, I can read the code better now. I see that you are binding your loop variable to new values when you want to exit the loops and that you actually want your loops to run infinitely unless the va...
karkas General Coding Help 5 923 Feb-08-2020, 07:40 PM
    Thread: Error while trying to see Python version with "sys.executable"
Post: Error while trying to see Python version with "sys...

Hello everyone. I know some computer science concepts and can write programs in Python, which I have done but for my own use in the shell. However, there is a considerable amount of gaps I need to fi...
karkas General Coding Help 5 2,134 Feb-08-2020, 07:32 PM
    Thread: Struggling to exit this while loop
Post: RE: Struggling to exit this while loop

Hello, fatherted99. First of all, although one could still read your code, please add the corresponding indentation to each block. This is how it will actually run and is more intuitive to read. Wit...
karkas General Coding Help 5 923 Feb-08-2020, 07:15 PM
    Thread: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xda in positi...

(Sep-12-2019, 11:19 PM)newbieAuggie2019 Wrote: (Sep-02-2019, 09:45 PM)karkas Wrote: 9 00:00:15,377 --> 00:00:18,570 ESTAMOS HACIENDO UN FASCINANTE EXPERIMENTO. 10 00:00:19,150 --> 00:00:20,...
karkas General Coding Help 8 24,679 Feb-08-2020, 06:58 PM
    Thread: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xda in positi...

Quote:No this is where i placed the file,you can choose whatever place you like. Rember that python and pip should work from any folder same for all OS,for Windows look here So a test like this should...
karkas General Coding Help 8 24,679 Sep-12-2019, 08:51 PM
    Thread: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xda in positi...

Okay, I found the source of the problem and the solution and, honestly, it was a bit dumb. I just didn't look very well into that. When I was opening the new file for writing, I had done: newFile = ...
karkas General Coding Help 8 24,679 Sep-07-2019, 02:46 AM
    Thread: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Post: RE: 'utf-8' codec can't decode byte 0xda in positi...

Thank you very much for your very complete reply, snippsat. Quote:Try detect encoding chardet of file. This has taken me some time and I haven't found a way to figure it out. I tried this: import c...
karkas General Coding Help 8 24,679 Sep-06-2019, 02:02 PM
    Thread: 'utf-8' codec can't decode byte 0xda in position 184: invalid continuation byte
Post: 'utf-8' codec can't decode byte 0xda in position 1...

Hi everyone, I'm getting this error and have been looking online but don't really understand for my specific case and don't really know why this could be happening. This is the error : 'Unicode...
karkas General Coding Help 8 24,679 Sep-02-2019, 09:45 PM
    Thread: Binding not explicitly declared happening
Post: RE: Binding not explicitly declared happening

(Aug-04-2019, 07:51 AM)ichabod801 Wrote: index is a method, which is a special type of function, specifically defined for a particular class. So b.index('f') is like calling index(b, 'f'), but you c...
karkas General Coding Help 4 1,220 Aug-05-2019, 05:09 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020