Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: What would be a way to check if a variable or class existed in an if?
Post: RE: What would be a way to check if a variable or ...

Here you go. The try/catch option is presented as Mekire suggested as is an alternative: https://stackoverflow.com/questions/8432...ble-exists
SRG General Coding Help 8 5,114 Dec-21-2017, 05:54 PM
    Thread: Add column to csv file based on values in existing column
Post: RE: Add column to csv file based on values in exis...

If you post your code, we can offer more succinct guidance. In the absence, however, I can suggest you look at the .split() function of strings. You can split the value in header1 and output it as a...
SRG General Coding Help 3 4,796 Dec-21-2017, 05:51 PM
    Thread: Large Data-set Edit | Ideal language?
Post: RE: Large Data-set Edit | Ideal language?

Personally, I'd look at sed or awk. They were made for exactly this kind of project. It sounds like a one-liner, to be honest. Python is very capable of performing this. It'd be only a couple of line...
SRG General Coding Help 4 3,399 Dec-21-2017, 05:48 PM
    Thread: Learning matplotlib - axis not lining up
Post: RE: Learning matplotlib - axis not lining up

Because it's supposed to be: plt.plot([point[0], point[2]], [point[1], point[3]])[x1, x2],[y1, y2] not [x1, y1],[x2, y2]
SRG General Coding Help 1 2,386 Dec-17-2017, 05:36 PM
    Thread: Make a Function from Name String
Post: RE: Make a Function from Name String

def get_name(namePart): posName = namePart.find("name:") if (posName > -1): name = namePart[posName+6:len(namePart)] else: name = "Unknown" return name
SRG General Coding Help 4 3,323 Dec-17-2017, 05:00 PM
    Thread: Updating matplotlib image
Post: RE: Updating matplotlib image

Here you go. Just watched a video showing exactly this. https://www.youtube.com/watch?v=ZmYPzESC5YY
SRG Data Science 2 12,883 Dec-17-2017, 04:55 PM
    Thread: Learning matplotlib - axis not lining up
Post: Learning matplotlib - axis not lining up

Hi. I'm learning matplotlib and have an issue. I have a scatter plot working perfectly. I'm trying to draw lines between two points but it seems to be on a completely different axis scale. Why isn't...
SRG General Coding Help 1 2,386 Dec-17-2017, 04:34 PM

User Panel Messages

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