Commit 46a0f38
committed
BUG: Fix pd.Timedelta(None) to return NaT.
Before this commit pd.Timedelta raised ValueError
when None is passed.
This behavior is inconsistent because
* pd.Timestamp(None) and pd.Period(None) return NaT
* pd.Timedelta returns NaT if '', 'nat', 'NAT' or np.nan
is passed1 parent b60e42b commit 46a0f38
File tree
3 files changed
+5
-2
lines changed- doc/source/whatsnew
- pandas
- tseries/tests
3 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
2595 | | - | |
| 2595 | + | |
2596 | 2596 | | |
2597 | 2597 | | |
2598 | | - | |
| 2598 | + | |
2599 | 2599 | | |
2600 | 2600 | | |
2601 | 2601 | | |
| |||
0 commit comments