Update stats.py

shortened the /stats column headers
pull/23/head
hndrk-themer 2023-04-18 10:43:22 +02:00 zatwierdzone przez GitHub
rodzic 750427a841
commit 1f658bb391
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -199,7 +199,7 @@ class StatsRunner(object):
elif lquery:
df.columns = ['User', 'lquery', 'Percent']
else:
df.columns = ['User', 'Total Messages', 'Percent']
df.columns = ['User', 'Messages', '%']
df['User'] = df['User'].str.replace(r'[^\x00-\x7F]|[@]', "", regex=True) # Drop emoji and @
text = df.iloc[:n].to_string(index=False, header=True, float_format=lambda x: f"{x:.1f}")