w3resource

Pandas DataFrame: at_time() function

DataFrame - at_time() function

The at_time() function is used to select values at particular time of day (e.g. 9:30 AM).

Syntax:

DataFrame.at_time(self, time, asof=False, axis=None)

Parameters:

Name Description Type/Default Value Required / Optional
time    datetime.time or str Required
axis    {0 or 'index', 1 or 'columns'}
Default Value: 0
Required

Returns: Series or DataFrame

Raises: TypeError
If the index is not a DatetimeIndex

Example:


Download the Pandas DataFrame Notebooks from here.

Previous: DataFrame - add_suffix() function
Next: DataFrame - between_time() function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/pandas/dataframe/dataframe-at_time.php