Spaces:
Runtime error
Runtime error
castorfou
commited on
Commit
·
98625a3
1
Parent(s):
cf89620
2022-10-07_18:07
Browse files
rbc.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: update_classement.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
-
__all__ = ['PAGE', 'html_tables', 'df_adherents', 'get_classement', 'add_classements']
|
5 |
|
6 |
# %% update_classement.ipynb 4
|
7 |
PAGE = 'https://badmania.fr/club-joueurs-2254-riom-badminton-club.html'
|
@@ -18,9 +18,18 @@ def get_classement(
|
|
18 |
classement_licencie = df_adherents[df_adherents['Licence'] == license_number]['Class.']
|
19 |
return classement_licencie.values[0] if len(classement_licencie)>0 else ''
|
20 |
|
21 |
-
# %% update_classement.ipynb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
def add_classements(dataframe, #le dataframe des adherents
|
23 |
):
|
24 |
dataframe = dataframe.copy()
|
25 |
dataframe['Classement']= dataframe['Licence'].apply(lambda x: get_classement(x))
|
|
|
26 |
return dataframe
|
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: update_classement.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
+
__all__ = ['PAGE', 'html_tables', 'df_adherents', 'get_classement', 'get_classements', 'add_classements']
|
5 |
|
6 |
# %% update_classement.ipynb 4
|
7 |
PAGE = 'https://badmania.fr/club-joueurs-2254-riom-badminton-club.html'
|
|
|
18 |
classement_licencie = df_adherents[df_adherents['Licence'] == license_number]['Class.']
|
19 |
return classement_licencie.values[0] if len(classement_licencie)>0 else ''
|
20 |
|
21 |
+
# %% update_classement.ipynb 14
|
22 |
+
def get_classements(
|
23 |
+
license_number,# le numero de license
|
24 |
+
):
|
25 |
+
classement_licencie = df_adherents[df_adherents['Licence'] == license_number]['Class.']
|
26 |
+
classement = classement_licencie.values[0] if len(classement_licencie)>0 else '-/-/-'
|
27 |
+
return pd.Series(classement.split('/'))
|
28 |
+
|
29 |
+
# %% update_classement.ipynb 29
|
30 |
def add_classements(dataframe, #le dataframe des adherents
|
31 |
):
|
32 |
dataframe = dataframe.copy()
|
33 |
dataframe['Classement']= dataframe['Licence'].apply(lambda x: get_classement(x))
|
34 |
+
dataframe[['S', 'D', 'M']]= dataframe['Licence'].apply(lambda x: get_classements(x))
|
35 |
return dataframe
|