mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-09 09:21:40 +08:00
update
This commit is contained in:
42
leetcode-cn/problem (Chinese)/修改列 [modify-columns].html
Normal file
42
leetcode-cn/problem (Chinese)/修改列 [modify-columns].html
Normal file
@@ -0,0 +1,42 @@
|
||||
<pre>
|
||||
DataFrame <code>employees</code>
|
||||
+-------------+--------+
|
||||
| Column Name | Type |
|
||||
+-------------+--------+
|
||||
| name | object |
|
||||
| salary | int |
|
||||
+-------------+--------+
|
||||
</pre>
|
||||
|
||||
<p>一家公司决定增加员工的薪水。</p>
|
||||
|
||||
<p>编写一个解决方案,将每个员工的薪水乘以2来 <strong>修改</strong> <code>salary</code> 列。</p>
|
||||
|
||||
<p>返回结果格式如下示例所示。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><b>示例 1:</b></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:
|
||||
</strong>DataFrame employees
|
||||
+---------+--------+
|
||||
| name | salary |
|
||||
+---------+--------+
|
||||
| Jack | 19666 |
|
||||
| Piper | 74754 |
|
||||
| Mia | 62509 |
|
||||
| Ulysses | 54866 |
|
||||
+---------+--------+
|
||||
<strong>输出:
|
||||
</strong>+---------+--------+
|
||||
| name | salary |
|
||||
+---------+--------+
|
||||
| Jack | 39332 |
|
||||
| Piper | 149508 |
|
||||
| Mia | 125018 |
|
||||
| Ulysses | 109732 |
|
||||
+---------+--------+
|
||||
<strong>解释:
|
||||
</strong>每个人的薪水都被加倍。</pre>
|
Reference in New Issue
Block a user