
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arnab Chakraborty has Published 4293 Articles

Arnab Chakraborty
8K+ Views
Get the current date and time from Timestamp object, use the timestamp.today() method.At first, import the required libraries −import pandas as pd import datetimeCreate the timestamp in Pandastimestamp = pd.Timestamp(datetime.datetime(2021, 10, 10)) Display the Timestampprint("Timestamp: ", timestamp)Getting the current date and timeres = timestamp.today() ExampleFollowing is the code import pandas ... Read More

Arnab Chakraborty
10K+ Views
To convert a Timestamp object to a native Python datetime object, use the timestamp.to_pydatetime() method.At first, import the required libraries −import pandas as pdCreate the timestamp object in Pandastimestamp = pd.Timestamp('2021-09-11T13:12:34.261811') Convert timestamp to native Python datetime objecttimestamp.to_pydatetime()ExampleFollowing is the code import pandas as pd # set the timestamp ... Read More

Arnab Chakraborty
652 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter. For hourly frequency, set freq as H.At first, import the required libraries −import pandas as pdCreate the timestamp object in Pandastimestamp = pd.Timestamp(2021, 9, 18, 11, 50, 20, 33) Convert timestamp ... Read More

Arnab Chakraborty
602 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter. For quarterly frequency, set freq as Q.At first, import the required libraries −import pandas as pdCreate the timestamp object in Pandastimestamp = pd.Timestamp(2021, 9, 18, 11, 50, 20, 33) Convert timestamp ... Read More

Arnab Chakraborty
558 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter. For monthly frequency, set freq as M.At first, import the required libraries −import pandas as pdSet the timestamp object in Pandastimestamp = pd.Timestamp(2021, 9, 18, 11, 50, 20, 33) Convert timestamp ... Read More

Arnab Chakraborty
375 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter. For weekly frequency, set freq as W.At first, import the required libraries −import pandas as pdCreate the timestamp object in Pandastimestamp = pd.Timestamp(2021, 9, 18, 11, 50, 20, 33) Convert timestamp ... Read More

Arnab Chakraborty
160 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter. For minutely frequency, set freq as T.At first, import the required libraries −import pandas as pdCreate a timestamp objecttimestamp = pd.Timestamp(2021, 9, 6, 11, 50, 20, 33) Convert timestamp to Period. ... Read More

Arnab Chakraborty
819 Views
To convert given Timestamp to Period, use the timestamp.to_period() method. Within that, set the frequency using the freq parameter.At first, import the required libraries −import pandas as pdSet the timestamp object in Pandastimestamp = pd.Timestamp('2021-09-14T15:12:34.261811624')Now, convert timestamp to Period. We have set the frequency as Month using the "freq" parameter ... Read More

Arnab Chakraborty
120 Views
Suppose we have a number n. We have to find $e^{x}$ efficiently, without using library functions. The formula for $e^{x}$ is like$$e^{x} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + ...$$So, if the input is like x = 5, then the output will be 148.4131 because e^x = 1 ... Read More

Arnab Chakraborty
614 Views
Suppose we have two numbers a and b. We have to find how many positive integers are there, that are divisors to both a and b.So, if the input is like a = 288 b = 240, then the output will be 10 because the common divisors are [1, 2, ... Read More