Prasad Naik has Published 74 Articles

How to reset index in Pandas dataframe?

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 10:14:44

306 Views

In this program, we will replace or, in other words, reset the default index in the Pandas dataframe. We will first make a dataframe and see the default index and then replace this default index with our custom index.AlgorithmStep 1: Define your dataframe. Step 2: Define your own index. Step ... Read More

Print dates of today, yesterday and tomorrow using Numpy

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 10:10:45

321 Views

In this program, we will print today's, yesterday's and tomorrow's dates using the numpy library.AlgorithmStep 1: Import the numpy library. Step 2: find today's date using the datetime64() function. Step 3: find yesterday's date by subtracting the output of timedelta64() function from the output of datetime64() function. Step 4: Find ... Read More

How to draw different shapes using the Python Turtle library?

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 10:08:58

3K+ Views

In this program, we will draw different shapes using the Turtle library in Python. Turtle is a python feature like a drawing board, which lets you command a turtle to draw all over it. The different shapes that we are going to draw are square, rectangle, circle and a hexagon.AlgorithmStep ... Read More

Python program to compare two Pandas series

Prasad Naik

Prasad Naik

Updated on 16-Mar-2021 09:55:48

392 Views

In this program, we will declare two Pandas series and compare their elements. Before we solve the problem, we need to import the Pandas library into our local IDE. This can be done by installing Pandas on our local machine. The command for installing Pandas is −pip install pandasInputSeries1 = ... Read More

Previous 1 ... 4 5 6 7 8
Advertisements