【发布时间】:2022-06-10 19:22:47
【问题描述】:
我正在为我的数据科学项目从几个来源收集数据。请注意,它是具有代表性的数据源As Input
数据源 1(当前存储为字符串列表)
####球员个人资料####
Player X
'Age', '35'
'Home', 'Agrentina'
'Money', '100'
Player Y
'Age', '34'
'Home', 'Brazil'
'Money', '4M'
Player Z
'Age', '24'
'Home', 'India'
'Money', '10000'
数据源 2 目前存储在我的循环代码中的 CSV 和 Dataframe 中
####Player 比赛详情 Battign ####
Player X
Bating
Run Dismisal
Match 13, 120, Bowled,
Match 22, 19, stamping,
Match 31, 15, Bowled,
Player Y
Batting
Run Dismisal
Match 56, 60, stamping,
Match 65, 19, stamping,
Match 29, 15, Bowled,
数据源 3 当前存储在我的代码中的 CSV 和 Dataframe 中
####球员比赛详情保龄球####
Player X
Bowling
Ball, Run rate, Type, Description
Match 43, 120, 7.5,Fast, Boweld fast; Pace High; Yorker;
Match 42, 19, 48.5,Spin, Bowled off break; Yorker;
Match 41, 15, 38.5,Fast, Yorker; Bowled slow;
Player Z
Bowling
Ball, Run rate, Type, Description
Match 51, 60, 9.4, Fast, Boweld fast; Pace High; Yorker;
Match 40, 48, 92.2, Fast, Yorker; Bowled slow;
####输出#####
我怎样才能有一个以下格式的数据库来轻松地显示特定的玩家数据?
Player Name, Age Home Money, 'No of Math BATED,' 'No of Match BOWLED,' 'Highest Mode of Dismissal,' 'Highest Mode of Dismissal.' "Show Most common two string"
Player X 35 Argentina 100 3 3 Bowled
Player Y 34 Brazil 4M 3 0 stamping
Player Z 24 India 10000 0 2 Nil
【问题讨论】:
-
请显示您的实际 CSV 数据。很难知道列标题是什么
-
你能指出它在哪里令人困惑吗?或者你能给我一个例子,我可以按照这些例子重新排列这些表格吗?