tm.assert_almost_equal(result, np.array([], dtype=np.int64))
assert result.dtype == np.int64
+ @pytest.mark.intel
def test_datetimelikes_nan(self):
arr = np.array([1, 2, np.nan])
exp = np.array([1, 2, np.datetime64('NaT')], dtype='datetime64[ns]')
expected = pd.Series(result, index=['A', 'B'])
tm.assert_series_equal(result, expected)
+ @pytest.mark.intel
def test_sum_nanops_timedelta(self):
# prod isn't defined on timedeltas
idx = ['a', 'b', 'c']
result = a.where(do_not_replace, b)
assert_frame_equal(result, expected)
+ @pytest.mark.intel
def test_where_datetime(self):
# GH 3311
df)), 'b': date_range('20100101', periods=len(df))})
check(df, df2)
+ @pytest.mark.intel
def test_timestamp_compare(self):
# make sure we can compare Timestamps on the right AND left hand side
# GH4982
grouped = df.groupby(df.index.month)
list(grouped)
+ @pytest.mark.intel
def test_agg_dict_parameter_cast_result_dtypes(self):
# GH 12821
result = base - offset
assert result == expected_sub
+ @pytest.mark.intel
def test_timedelta_ops_with_missing_values(self):
# setup
s1 = pd.to_timedelta(Series(['00:00:01']))
series[2] = val
assert isna(series[2])
+ @pytest.mark.intel
def test_NaT_cast(self):
# GH10747
result = Series([np.nan]).astype('M8[ns]')
series[2] = val
assert isna(series[2])
+ @pytest.mark.intel
def test_NaT_cast(self):
result = Series([np.nan]).astype('period[D]')
expected = Series([NaT])
expected = Series([2, 1, 1], index=[5., 10.3, np.nan])
tm.assert_series_equal(result, expected)
+ @pytest.mark.intel
def test_value_counts_normalized(self):
# GH12558
s = Series([1, 2, np.nan, np.nan, np.nan])
assert_frame_equal(frame.resample('60s').mean(), frame_3s)
+ @pytest.mark.intel
def test_resample_timedelta_values(self):
# GH 13119
# check that timedelta dtype is preserved when NaT values are
res = df['time'].resample('2D').first()
tm.assert_series_equal(res, exp)
+ @pytest.mark.intel
def test_resample_datetime_values(self):
# GH 13119
# check that datetime dtype is preserved when NaT values are