mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<pre>
 | 
						|
DataFrame <code>products</code>
 | 
						|
+-------------+--------+
 | 
						|
| Column Name | Type   |
 | 
						|
+-------------+--------+
 | 
						|
| name        | object |
 | 
						|
| quantity    | int    |
 | 
						|
| price       | int    |
 | 
						|
+-------------+--------+
 | 
						|
</pre>
 | 
						|
 | 
						|
<p>Write a solution to fill in the missing value as <code><strong>0</strong></code> in the <code>quantity</code> column.</p>
 | 
						|
 | 
						|
<p>The result format is in the following example.</p>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
<pre>
 | 
						|
<strong class="example">Example 1:</strong>
 | 
						|
<strong>Input:</strong>+-----------------+----------+-------+
 | 
						|
| name            | quantity | price |
 | 
						|
+-----------------+----------+-------+
 | 
						|
| Wristwatch      | None     | 135   |
 | 
						|
| WirelessEarbuds | None     | 821   |
 | 
						|
| GolfClubs       | 779      | 9319  |
 | 
						|
| Printer         | 849      | 3051  |
 | 
						|
+-----------------+----------+-------+
 | 
						|
<strong>Output:
 | 
						|
</strong>+-----------------+----------+-------+
 | 
						|
| name            | quantity | price |
 | 
						|
+-----------------+----------+-------+
 | 
						|
| Wristwatch      | 0        | 135   |
 | 
						|
| WirelessEarbuds | 0        | 821   |
 | 
						|
| GolfClubs       | 779      | 9319  |
 | 
						|
| Printer         | 849      | 3051  |
 | 
						|
+-----------------+----------+-------+
 | 
						|
<strong>Explanation:</strong> 
 | 
						|
The quantity for Wristwatch and WirelessEarbuds are filled by 0.</pre>
 |