1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 16:01:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-10-05 03:40:12 +08:00
parent cb4f82d60a
commit 96286caf59
92 changed files with 21178 additions and 13479 deletions

View File

@@ -0,0 +1,38 @@
<pre>
DataFrame <code>students</code>
+-------------+--------+
| Column Name | Type |
+-------------+--------+
| student_id | int |
| name | object |
| age | int |
| grade | float |
+-------------+--------+
</pre>
<p>Write a solution to correct the errors:</p>
<p>The <code>grade</code> column is stored as floats,&nbsp;convert it to integers.</p>
<p>The result format is in the following example.</p>
<p>&nbsp;</p>
<pre>
<strong class="example">Example 1:</strong>
<strong>Input:
</strong>DataFrame students:
+------------+------+-----+-------+
| student_id | name | age | grade |
+------------+------+-----+-------+
| 1 | Ava | 6 | 73.0 |
| 2 | Kate | 15 | 87.0 |
+------------+------+-----+-------+
<strong>Output:
</strong>+------------+------+-----+-------+
| student_id | name | age | grade |
+------------+------+-----+-------+
| 1 | Ava | 6 | 73 |
| 2 | Kate | 15 | 87 |
+------------+------+-----+-------+
<strong>Explanation:</strong>
The data types of the column grade is converted to int.</pre>