How do I get the sum of numbers for each column in a csv file separately. Then select the top 3 column and place them in a new list in order?

My top 4 procedure had a bug in it for items close to my stopper, so I had to rewrite it, breaking it down into a sort routine and a top n clipper routine.

I added the final steps needed to pick out and sort the requested column numbers, as penance for my bug.
sensor_group_log.aia (30.9 KB)

Capture






1 Like

Correct ~ Marvelous ~ Many thanks for your kind help !
Best regards,
Tommy

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Dear ABG,
Please link with the last Q&A. (from ABG / Power User)

Attachment : Last aia and my python sample

Best regards,
Tommy
python to AI2.pdf (294.4 KB)
sensor_group_log.aia (30.9 KB)

Dear ABG,
Please link with the last Q&A. I still need your kind help.

Attachment : Last aia and my python sample
Could you kind help me to rebuild a new.aia continued with last aia ?
Sorry,I’m not familiar with AI2. But I have to finish this AI2 program this week.
Best regards,
Tommy
python to AI2.pdf (294.4 KB)
sensor_group_log.aia (30.9 KB)

Hello Gtios,

Definitely you will get solution or direction to find solution. I am sorry if my concern not correct/good, but in my opinion every Power Users are equally capable to solve the problem, yes offcourse some users are expert in one area and some in others. But it dont look good to mention or refer one user can solve this, as you have done in your post subject/title. Please remove section where you have mentioned - wish ABG can help.

No doubt ABG is very great and knowledgeable person.

Thanks

3 Likes

Done.

I made your request public to allow those with more time and Python extension experience to chip in.

1 Like

You have me confused with this guy ...

3 Likes

I have finished my personal errands and done my rounds of easy to answer questions.

I double checked this thread and saw that I answered your original question.

I see you have posted a pdf and an .aia, but I do not see:

  • What your project was supposed to do
  • What you got working
  • what does not work
  • what you don't know how to implement
  • what you tried.

Thanks, your Honor -- I mean, your Excellency -- I mean, your Wizardry.

1 Like

Here is you answer according to the python file and its output.

image

image

1 Like

Hi, rnareshu,
one more question.
Suppose I just want to fix 0x04 as byte0, because it is a fix header of a command.
Do I just need to change the value of key0 from 0 to 4 in command dictionary ?
Looking forward to hear from you soon and thanks for your support.
Best regards,
Tommy

Yes, you just need to make this modification only, as

1 Like

Hi , ABG
I have a problem with my APP . The previous program used 1~48 sensor numbers as follows:


Now sensor is changed to number 0~47

This is the column sum list of log.csv, sensor1~48 execute ok, but change it to 0~47, the following error appears

Could you help me to solve the bug?

Lists in App Inventor start with index = 1... if you try to select the 0th item of a list, you will get that error "attempt to get item 0 of list ..."

Taifun

1 Like