ForzaJuve1
commited on
Commit
•
dbbca69
1
Parent(s):
de6caeb
Update Integration.py
Browse files- Integration.py +30 -5
Integration.py
CHANGED
@@ -558,6 +558,31 @@ class Euro2020Dataset(GeneratorBasedBuilder):
|
|
558 |
#df = table.to_pandas()
|
559 |
df = pd.read_parquet(filepath)
|
560 |
for id, row in df.iterrows():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
#'id' here is the index of the row in the DataFrame
|
563 |
#'row' is a Pandas Series object representing the row data
|
@@ -618,10 +643,10 @@ class Euro2020Dataset(GeneratorBasedBuilder):
|
|
618 |
"Humidity": row["Humidity"],
|
619 |
"Temperature": row["Temperature"],
|
620 |
"WindSpeed": row["WindSpeed"],
|
621 |
-
"MatchEvent":
|
622 |
-
"TeamLineUps":
|
623 |
-
"TeamStats":
|
624 |
-
"PlayerStats":
|
625 |
-
"PlayerPreMatchInfo":
|
626 |
}
|
627 |
|
|
|
558 |
#df = table.to_pandas()
|
559 |
df = pd.read_parquet(filepath)
|
560 |
for id, row in df.iterrows():
|
561 |
+
MatchEvent: row["MatchEvent"]
|
562 |
+
TeamLineUps: row["TeamLineUps"]
|
563 |
+
TeamStats: row["TeamStats"]
|
564 |
+
PlayerStats: row["PlayerStats"]
|
565 |
+
PlayerPreMatchInfo: row["PlayerPreMatchInfo"]
|
566 |
+
|
567 |
+
MatchEvent_dict = {}
|
568 |
+
for key in MatchEvent.keys():
|
569 |
+
MatchEvent_dict[key] = MatchEvent[key]
|
570 |
+
|
571 |
+
TeamLineUps_dict = {}
|
572 |
+
for key in TeamLineUps.keys():
|
573 |
+
TeamLineUps_dict[key] = TeamLineUps[key]
|
574 |
+
|
575 |
+
TeamStats_dict = {}
|
576 |
+
for key in TeamStats.keys():
|
577 |
+
MatchEvent_dict[key] = MatchEvent[key]
|
578 |
+
|
579 |
+
PlayerStats_dict = {}
|
580 |
+
for key in PlayerStats.keys():
|
581 |
+
PlayerStats_dict[key] = PlayStats[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
|
|
|
643 |
"Humidity": row["Humidity"],
|
644 |
"Temperature": row["Temperature"],
|
645 |
"WindSpeed": row["WindSpeed"],
|
646 |
+
"MatchEvent": MatchEvent_dict,
|
647 |
+
"TeamLineUps": TeamLineUps_dict,
|
648 |
+
"TeamStats": TeamStats_dict,
|
649 |
+
"PlayerStats": PlayerStats_dict,
|
650 |
+
"PlayerPreMatchInfo": PlayerPreMatchInfo_dict,
|
651 |
}
|
652 |
|