<p>我目前正在用jupyter笔记本做一个python项目。我想预测一下法国体育场的上座率。你知道吗</p>
<p>为了实现这一点,我已经采取了美丽的汤从网上的数据。我现在正试图清理我的数据:我有一些缺少的价值观的体育场,我想指定一个特定的球队(里昂奥林匹克体育场)。你知道吗</p>
<p>我第一次尝试:</p>
<pre><code>stats_match.stade[(stats_match.saison >= 2017) & (stats_match.domicile == 'Olympique Lyonnais') & (stats_match.stade.isna())] = 'Groupama stadium'
</code></pre>
<p>这给了我一个错误:</p>
<blockquote>
<p>SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame</p>
</blockquote>
<p>所以我按照指示试着:</p>
<pre><code>stats_match.stade.loc((stats_match.saison >= 2017) & (stats_match.domicile == 'Olympique Lyonnais') & (stats_match.stade.isna())) = 'Groupama stadium'
</code></pre>
<p>这给了我:</p>
<blockquote>
<p>File "", line 3
stats_match.stade = stats_match.stade.loc((stats_match.saison >= 2017) & (stats_match.domicile == 'Olympique Lyonnais') & (stats_match.domicile.isna())) = 'Groupama stadium'<br/>
SyntaxError: can't assign to function call</p>
</blockquote>
<p>我错过了什么?我必须使用。在哪里使用函数?
非常感谢</p>