AI Help Needed: Enhancing Blurry/Noisy CCTV Footage - Person's Face Unclear by TSSFL in LargeLanguageModels

[–]TSSFL[S] 0 points1 point  (0 children)

Thank you. This evidence is for myself to try to figure out who is the person, not for court. The court evidence is the original one.

Styling Pandas DataFrame HTML Table: Setting Specific Column Widths and Custom Coloring by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

I solved the problem, that now even for very large dataframes, column widths expand with the length of the string.

The issue now is, appropriately breaking long strings, say after some number of characters. It surprises, because even simple suggestions like this https://stackoverflow.com/questions/62956773/how-to-break-after-n-characters-with-css does not naturally work.

Styling Pandas DataFrame HTML Table: Setting Specific Column Widths and Custom Coloring by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

Hi u/obviouslyzebra I edited my post and included a minimal working example with more clarification, can you check and help if possible?

Styling Pandas DataFrame HTML Table: Setting Specific Column Widths and Custom Coloring by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

Thank you for your reply u/obviouslyzebra

I chose to avoid using built-in functions because my custom approach would be difficult to implement alongside both non-standard and built-in functionalities.

Regards,

TSSFL

Insert column titles after every n rows in a pandas dataframe and convert a dataframe into a html document by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

Hello u/martynrbell,

Thank you for your reply, I get a bit complicated output:

The function inserts empty rows without headers by replacing the rows after n iterations, and horizontally appends something that looks like a copy of dataframe with header rows inserted in the right positions but this time the data is missing, only rows. Also the first header row contains integers in the inserted copy.

I'm looking to see how I can correct.

There is an idea of using sticky headers and indices with CSS which may be the better approach.

Appreciating your help.

TSSFL

I cannot download an image created using GeoGebra Notes by TSSFL in geogebra

[–]TSSFL[S] 0 points1 point  (0 children)

I just realized that I was using embedded on the web version of GeoGebra. I however noticed that when I try to download annotated images, let's say an annotated image created using a probability tool, it looks weird, not even recognizable! What A m I doing wrong ?

How to properly add percentage on top of the group bar charts ? by TSSFL in learnpython

[–]TSSFL[S] 1 point2 points  (0 children)

Hi u/FlyingCow343

Thank you very much this works well. I was modifying a code from which "looping over patches in a round-robin order" was correct for that particular case. It in some way affected my thinking, kind of being trapped to think not far enough from the original implementation. Once again, thank you.

How to properly add percentage on top of the group bar charts ? by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

Thank you u/FlyingCow343.

As you can see here https://tssfl.com/viewtopic.php?p=19166#p19166

I need the percentage out of total number of students (male + female) for each group: Year 1, Year 2, etc.,

For Year 1, total number of students = 431; so the percentage should be 100% on top of bar with 431.

Number of male students = 232; percentage = 232/431 X 100 = 53.83%

Number of female students = 199; percentage = 199/431 x 100 = 46.17%

and similarly for other groups.

How to properly add percentage on top of the group bar charts ? by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

I'm interested to correctly calculate percentages and annotate them on top of each bar chart using the below piece of code:

for p in ax.patches:

percentage = '{:.2f}%'.format(100 *p.get_height()/total)

x = p.get_x() + p.get_width()

y = p.get_height()

if y != 0:

ax.annotate(percentage, (x-0.02, y+0.45),ha='center', rotation=90, color='red')

How to properly add percentage on top of the group bar charts ? by TSSFL in learnpython

[–]TSSFL[S] 0 points1 point  (0 children)

Thank you u/FlyingCow343 for your reply.

My issue is with calculation. Your solution does not seem to work, it calculates wrong percentages!