I'm trying to print a table of my database using :
pd.read_sql_query("SELECT name,duration FROM activity where (strftime('%W', date) = strftime('%W', 'now'))", conn))
and it work it prints :
name duration
0 programmation 150
1 lecture 40
2 ctf 90
3 ceh 90
4 deep learning 133
5 vm capture the flag 100
but I would like to use my function minuteToStr who translate the duration to string likes "1h30" on the duraton colowns. I tried this code but it does'nt work :
tableau = str(pd.read_sql_query("SELECT name,duration FROM activity\
where (strftime('%W', date) = strftime('%W', 'now'))", conn))
tableau = re.sub("([0-9]{2,})", minuteToStr(int("\\1")), tableau)
print(tableau)
Thanks