Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: If Statement not working...Why?
Post: RE: If Statement not working...Why?

perfringo, Thanks so much. That was the problem. String versus Boolean.
Milfredo General Coding Help 2 818 Oct-17-2020, 03:23 AM
    Thread: If Statement not working...Why?
Post: If Statement not working...Why?

Here is a snippet of code and what it produces. I don't understand what is going on. def complete_form(): horses_names = [] for i, var in enumerate(scratched): scratched_list.append(var.get...
Milfredo General Coding Help 2 818 Oct-17-2020, 12:24 AM
    Thread: Modulation confusion.
Post: Modulation confusion.

I am redesigning my horse race handicapping program based on everyone's advice concerning classes and Modules. So I will post my beginning effort and explain my confusion. from tkinter import * from ...
Milfredo General Coding Help 0 564 Oct-09-2020, 04:39 AM
    Thread: Global not working why?
Post: RE: Global not working why?

Thanks
Milfredo General Coding Help 13 2,012 Oct-06-2020, 02:37 AM
    Thread: Global not working why?
Post: RE: Global not working why?

I will stop and look over my code. This is how it is laid out and should work to the point where I am now. Program loads and presents a GUI. 1.On that there is a text box, user enters race date to h...
Milfredo General Coding Help 13 2,012 Oct-05-2020, 11:45 PM
    Thread: Global not working why?
Post: RE: Global not working why?

I have tried everything but I can't get access to scratched list after the scratched_list is created in complete_form(). def complete_form(): global scratched_list scratched_list = [] for i...
Milfredo General Coding Help 13 2,012 Oct-04-2020, 06:44 AM
    Thread: Global not working why?
Post: RE: Global not working why?

No. because the track and the race number has to be selected by user before call to Handi. After call to handi then call to get scratches which then calls complete form, which is where scratched list ...
Milfredo General Coding Help 13 2,012 Oct-03-2020, 01:28 AM
    Thread: Global not working why?
Post: Global not working why?

I know Global's are looked down upon, but in this instance I don't know what else to do. Any in the function at top the print statement works just fine as you will see in the out put. But when same pr...
Milfredo General Coding Help 13 2,012 Oct-02-2020, 07:29 AM
    Thread: Appending list Trouble Big Time
Post: RE: Appending list Trouble Big Time

Found out how to create a new data frame with just the rows I need. Now I will massage the data to get what I want. Thanks again Guys.
Milfredo General Coding Help 7 1,277 Oct-01-2020, 02:59 AM
    Thread: Appending list Trouble Big Time
Post: RE: Appending list Trouble Big Time

Yes there is. In fact I have a friend who wrote a program much like mine, but in his he has 4,000 factors. The individual track and horse data I read through to get info for just one race is in a dat...
Milfredo General Coding Help 7 1,277 Sep-29-2020, 07:35 AM
    Thread: Appending list Trouble Big Time
Post: RE: Appending list Trouble Big Time

I struggle with finding the correct logic a lot of the time. So I program with a sledgehammer instead of a scalpel. I am trying to get better. I just changed the extract data to your code. def extrac...
Milfredo General Coding Help 7 1,277 Sep-28-2020, 11:02 PM
    Thread: Appending list Trouble Big Time
Post: RE: Appending list Trouble Big Time

I printed out the the data in the form it is in before trying to append it and it prints out just fine. I know I am doing something wrong. I just don't understand why only the last horse gets appended...
Milfredo General Coding Help 7 1,277 Sep-28-2020, 06:30 AM
    Thread: Appending list Trouble Big Time
Post: Appending list Trouble Big Time

I am trying to append a list of elements to a larger list as I iterate through the data. Something crazy is happening. def extract_horse_data(): horses_name.append( xx[horse_count][18]) hors...
Milfredo General Coding Help 7 1,277 Sep-28-2020, 05:37 AM
    Thread: General list size question to solve problem
Post: RE: General list size question to solve problem

The problem turned out to be, I added data points to the code, but was trying to read csv file with less data points in the line. Got it working fine now. Thank you again.
Milfredo General Coding Help 3 939 Sep-27-2020, 08:42 AM
    Thread: General list size question to solve problem
Post: RE: General list size question to solve problem

Thank you so much.
Milfredo General Coding Help 3 939 Sep-27-2020, 07:37 AM
    Thread: General list size question to solve problem
Post: General list size question to solve problem

I really appreciate all of the help I have gotten here. Need more.I have a list: horses_info = []I run my program and append elements to the list. When I get to the following: def extract_horse_data...
Milfredo General Coding Help 3 939 Sep-27-2020, 06:34 AM
    Thread: Do I have to pass 85 variables to function?
Post: RE: Do I have to pass 85 variables to function?

Snip, I download files from internet in CSV form and read them with pandas into the dictionary I showed earlier. Some of the things you guys have shown I am just learning about. Having to learn the s...
Milfredo General Coding Help 10 1,686 Sep-26-2020, 10:13 PM
    Thread: Do I have to pass 85 variables to function?
Post: RE: Do I have to pass 85 variables to function?

Thank you guys for the response. I will look at your response closely so I can understand what's going on and what I need to do. Here is what I am doing with the info from the raw files I download. ...
Milfredo General Coding Help 10 1,686 Sep-26-2020, 01:28 PM
    Thread: Do I have to pass 85 variables to function?
Post: RE: Do I have to pass 85 variables to function?

When I try and pass xx which is a dataframe I believe, I get the following message. def load_horse_data(xx): horse_array[horse_count][0] = xx[hcount][race_number] horse_array[horse_count][1] = xx[...
Milfredo General Coding Help 10 1,686 Sep-26-2020, 05:52 AM
    Thread: Do I have to pass 85 variables to function?
Post: RE: Do I have to pass 85 variables to function?

They are in a dictionary. The dictionary is 64 lines long. In the dictionary I only need in the first race just 6 lines, which I am pulling out. And in each line of the dictionary there are 85 data po...
Milfredo General Coding Help 10 1,686 Sep-26-2020, 01:34 AM

User Panel Messages

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