Python Forum
What to use with simple calculations
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What to use with simple calculations
#1
I'm writing a horse race handicapping program. I have numbers generated by a horse's previous performances. I read those into the program. Then I need to do some comparing to get rankings, sort a group of numbers and simple calcs like that. What would be the best way to do so? Use numpy arrays? lists? Pandas?

Thank You.
Reply
#2
To get a good answer to your question, please post code so far.
Reply
#3
I may not be able to get a good answer then, in as much as I have 1500 lines of code written already. The horses raw data is in a list of dictionaries. So I will take the raw data and make my computations ending in numbers that I will eventually want to display in graphs. I'm transitioning from another language and hasn't been easy for this old mind.
Reply
#4
So, is your data read from a file or is it hard coded? 1500 lines is a lot of code.

In general I like Pandas, and it can read common formats if you have your data in a file.
Reply
#5
Yes. I use Pandas to read in and parse the csv files. In the other language I used I would use a 2 dimensional array. I'm just learning Python, so just not sure which would be the best way to process the race data. I realized, that it's only about 1200 to 1300 lines due to the white spaces between lines.
Reply
#6
That's a ton of code. Still, I would stick with Pandas, my preference,
Reply
#7
Thanks for the input.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Evaluate Calculations yrstruly 0 952 Jun-17-2023, 06:51 PM
Last Post: yrstruly
  huge and weird values after applying some calculations karlito 2 2,133 Dec-13-2019, 08:32 AM
Last Post: karlito
  Pandas .rolling() with some calculations inside irmscher 5 6,130 Apr-04-2019, 11:55 AM
Last Post: scidam
  Pandas, cryptocurrency and some calculations vvinni 0 1,995 Mar-10-2019, 03:52 PM
Last Post: vvinni

Forum Jump:

User Panel Messages

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