ForzaJuve1
commited on
Commit
•
d50ad65
1
Parent(s):
ae41a29
Update Integration.py
Browse files- Integration.py +23 -22
Integration.py
CHANGED
@@ -558,31 +558,32 @@ class Euro2020Dataset(GeneratorBasedBuilder):
|
|
558 |
#df = table.to_pandas()
|
559 |
df = pd.read_parquet(filepath)
|
560 |
for id, row in df.iterrows():
|
561 |
-
|
562 |
-
TeamLineUps = row["TeamLineUps"]
|
563 |
-
TeamStats = row["TeamStats"]
|
564 |
-
PlayerStats = row["PlayerStats"]
|
565 |
-
PlayerPreMatchInfo = row["PlayerPreMatchInfo"]
|
566 |
|
567 |
-
|
568 |
-
|
569 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
|
571 |
-
|
572 |
-
|
573 |
-
|
|
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
PlayerStats_dict = {}
|
580 |
-
for key in PlayerStats.keys():
|
581 |
-
PlayerStats_dict[key] = PlayerStats[key]
|
582 |
-
|
583 |
-
PlayerPreMatchInfo_dict = {}
|
584 |
-
for key in PlayerPreMatchInfo.keys():
|
585 |
-
PlayerPreMatchInfo_dict[key] = PlayerPreMatchInfo[key]
|
586 |
|
587 |
#'id' here is the index of the row in the DataFrame
|
588 |
#'row' is a Pandas Series object representing the row data
|
|
|
558 |
#df = table.to_pandas()
|
559 |
df = pd.read_parquet(filepath)
|
560 |
for id, row in df.iterrows():
|
561 |
+
MatchEvent_dict, TeamLineUps_dict, TeamStats_dict, PlayerStats_dict, PlayerPreMatchInfo_dict = {}, {}, {}, {}, {}
|
|
|
|
|
|
|
|
|
562 |
|
563 |
+
if row["MatchEvent"] is not None:
|
564 |
+
MatchEvent = row["MatchEvent"]
|
565 |
+
for key in MatchEvent.keys():
|
566 |
+
MatchEvent_dict[key] = MatchEvent[key]
|
567 |
+
|
568 |
+
if row["TeamLineUps"] is not None:
|
569 |
+
TeamLineUps = row["TeamLineUps"]
|
570 |
+
for key in TeamLineUps.keys():
|
571 |
+
TeamLineUps_dict[key] = TeamLineUps[key]
|
572 |
+
|
573 |
+
if row["TeamStats"] is not None:
|
574 |
+
TeamStats = row["TeamStats"]
|
575 |
+
for key in TeamStats.keys():
|
576 |
+
TeamStats_dict[key] = TeamStats[key]
|
577 |
|
578 |
+
if row["PlayerStats"] is not None:
|
579 |
+
PlayerStats = row["PlayerStats"]
|
580 |
+
for key in PlayerStats.keys():
|
581 |
+
PlayerStats_dict[key] = PlayerStats[key]
|
582 |
|
583 |
+
if row["PlayerPreMatchInfo"] is not None:
|
584 |
+
PlayerPreMatchInfo = row["PlayerPreMatchInfo"]
|
585 |
+
for key in PlayerPreMatchInfo.keys():
|
586 |
+
PlayerPreMatchInfo_dict[key] = PlayerPreMatchInfo[key]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
587 |
|
588 |
#'id' here is the index of the row in the DataFrame
|
589 |
#'row' is a Pandas Series object representing the row data
|