Time Deltas

Question 1
Marks : +2 | -2
Pass Ratio : 40%
Point out the correct statement.
Timedeltas are differences in times, expressed in difference units
You can construct a Timedelta scalar through various argument
DateOffsets cannot be used in construction
All of the mentioned
Explanation:
Timedeltas can be both positive and negative.
Question 2
Marks : +2 | -2
Pass Ratio : 10%
Using _________ on categorical data will produce similar output to a Series or DataFrame of type string.
.desc()
.describe()
.rank()
none of the mentioned
Explanation:
Categorical data has a categories and a ordered property.
Question 3
Marks : +2 | -2
Pass Ratio : 30%
All values of categorical data are either in categories or np.nan.
True
False
Explanation:
Categoricals are pandas data type.
Question 4
Marks : +2 | -2
Pass Ratio : 30%
Combination of TimedeltaIndex with DatetimeIndex allow certain combination operations that are NaT preserving.
True
False
Explanation:
You can also convert indices to yield another index.
Question 5
Marks : +2 | -2
Pass Ratio : 30%
Which of the following operations are supported on Time Frames?
idxmax
ixmax
ixmin
none of the mentioned
Explanation:
Operands can also appear in a reversed order.
Question 6
Marks : +2 | -2
Pass Ratio : 20%
Which of the following method can be used to rename categorical data?
Categorical.rename_categories()
Categorical.rename()
Categorical.mv_categories()
None of the mentioned
Explanation:
Renaming categories is done by assigning new values to the Series.cat.categories property.
Question 7
Marks : +2 | -2
Pass Ratio : 10%
Point out the wrong statement.
min, max, idxmin, idxmax operations are supported on Series
You cannot pass a timedelta to get a particular value
Division by the numpy scalar is true division
None of the mentioned
Explanation:
Dividing or multiplying a timedelta64[ns] Series by an integer or integer Series yields another timedelta64[ns] dtypes Series.
Question 8
Marks : +2 | -2
Pass Ratio : 10%
Which of the following scalars can be converted to other ‘frequencies’ by as typing to a specific timedelta type?
Timedelta Series
TimedeltaIndex
Timedelta
All of the mentioned
Explanation:
These operations yield Series and propagate NaT -> nan.
Question 9
Marks : +2 | -2
Pass Ratio : 10%
Which of the following is used to generate an index with time delta?
TimeIndex
TimedeltaIndex
LeadIndex
None of the mentioned
Explanation:
Using TimedeltaIndex you can pass string-like, Timedelta, timedelta, or np.timedelta64 objects.
Question 10
Marks : +2 | -2
Pass Ratio : 10%
Numeric reduction operation for timedelta64[ns] will return _________ objects.
Timeseries
Timeplus
Timedelta
None of the mentioned
Explanation:
NaT are skipped during evaluation.