Python | Pandas Timedelta.ceil() Last Updated : 14 Jan, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is the pandas equivalent of python’s datetime.timedelta and is interchangeable with it in most cases. Timedelta.ceil() method in pandas.Timedelta is used to return new Timedelta ceiled to this resolution. Syntax: Timedelta.ceil() Parameters: freq : a freq string indicating the ceiling resolution Returns: new ceiled Timedelta. Code #1: Python3 1== # importing pandas as pd import pandas as pd import datetime # Create the Timedelta object td = pd.Timedelta(5.05, unit ='s') # Print the Timedelta object print(td.ceil('S')) Output: 0 days 00:00:06 Code #2: Python3 1== # importing pandas as pd import pandas as pd import datetime # Create the Timedelta object td = pd.Timedelta(13.25, unit ='h') # Print the Timedelta object print(td.ceil('H')) Output: 0 days 14:00:00 Code #3: Python3 1== # importing pandas as pd import pandas as pd from datetime import datetime # Create the Timedelta object td = pd.Timedelta('7 days 15 hours') # Print the Timedelta object print(td.ceil('D')) Output: 8 days 00:00:00 Comment More infoAdvertise with us Next Article Python | Pandas Timedelta.delta S Shivam_k Follow Improve Article Tags : Python Python-pandas Python pandas-timedelta Practice Tags : python Similar Reads Python | Pandas TimedeltaIndex.ceil Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas TimedeltaIndex.ceil() function ceil the index of the TimedeltaIndex object to t 2 min read Python | Pandas Timedelta.delta Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is 1 min read Python | Pandas Timestamp.ceil Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Timestamp.ceil() function return a new Timestamp ceiled to this resolution. The 2 min read Python | Pandas Timedelta.floor() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is 1 min read Python | Pandas Timedelta.days Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is 1 min read Python | Pandas Timedelta.asm8 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Timedelta is a subclass of datetime.timedelta, and behaves in a similar manner. It is 1 min read Like