Spaces:
Sleeping
Sleeping
Commit
·
9650dfa
1
Parent(s):
7b96f10
refactor: just for rebooting HF space
Browse files- utils/mes_player_model.py +0 -15
utils/mes_player_model.py
CHANGED
|
@@ -177,25 +177,10 @@ class Player:
|
|
| 177 |
|
| 178 |
@staticmethod
|
| 179 |
def from_dict(series: pd.Series) -> "Player":
|
| 180 |
-
"""
|
| 181 |
-
Creates a Player instance from a pandas Series.
|
| 182 |
-
|
| 183 |
-
Args:
|
| 184 |
-
series (pd.Series): A pandas Series with player attributes.
|
| 185 |
-
|
| 186 |
-
Returns:
|
| 187 |
-
Player: A Player instance.
|
| 188 |
-
"""
|
| 189 |
data = series.copy()
|
| 190 |
return Player(**data)
|
| 191 |
|
| 192 |
def to_dict(self) -> Dict:
|
| 193 |
-
"""
|
| 194 |
-
Converts a Player instance to a dictionary.
|
| 195 |
-
|
| 196 |
-
Returns:
|
| 197 |
-
Dict: A dictionary representation of the Player instance.
|
| 198 |
-
"""
|
| 199 |
data = asdict(self)
|
| 200 |
# Convert datetime.date objects to string
|
| 201 |
for date_field in ["created_at_date", "updated_at_date"]:
|
|
|
|
| 177 |
|
| 178 |
@staticmethod
|
| 179 |
def from_dict(series: pd.Series) -> "Player":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
data = series.copy()
|
| 181 |
return Player(**data)
|
| 182 |
|
| 183 |
def to_dict(self) -> Dict:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
data = asdict(self)
|
| 185 |
# Convert datetime.date objects to string
|
| 186 |
for date_field in ["created_at_date", "updated_at_date"]:
|