
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
Rishikesh Kumar Rishi has Published 1156 Articles

Rishikesh Kumar Rishi
420 Views
To rename columns in a Pandas DataFrame, we can override df.columns with the new column names.StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print the input DataFrame.Override the columns with new list of column names.Print the DataFrame again with the renamed column names.Example Live Demoimport pandas as pd df = ... Read More

Rishikesh Kumar Rishi
910 Views
To select rows from a DataFrame based on column values, we can take the following Steps −Create a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print the input DataFrame.Use df.loc[df["x"]==2] to print the DataFrame when x==2.Similarly, print the DataFrame when (x >= 2) and (x < 2).Example Live Demoimport pandas as pd ... Read More

Rishikesh Kumar Rishi
354 Views
To iterate rows in a DataFrame in Pandas, we can use the iterrows() method, which will iterate over DataFrame rows as (index, Series) pairs.StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Iterate df using df.iterrows() method.Print each row with index.Example Live Demoimport pandas as pd df = pd.DataFrame( { ... Read More

Rishikesh Kumar Rishi
4K+ Views
To enable ffmpeg for matplotlib.animation, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Set the ffmpeg directory.Create a new figure or activate an existing figure, using figure() method.Add an 'ax1' to the figure as part of a subplot arrangement.Plot the ... Read More

Rishikesh Kumar Rishi
2K+ Views
To make multipartite graph in networkx, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a list of subset sizes and colors.Define a method for multilayered graph that could return a multilayered graph object.Set the color of the nodes.Position the ... Read More

Rishikesh Kumar Rishi
2K+ Views
To plot the difference of two distributions in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create a and b datasets using Numpy.Get kdea and kdeb, i.e., representation of a kernel-density estimate using Gaussian kernels.Create a grid using Numpy.Plot ... Read More

Rishikesh Kumar Rishi
368 Views
The Axes class contains most of the figure elements − Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system.stepsSet the figure size and adjust the padding between and around the subplots.Set the axes linewidth using rcParams.Add an axes to the current figure and make it the current axes.Set ... Read More

Rishikesh Kumar Rishi
8K+ Views
To visualize 95% confidence interval in Matplotlib, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x and y data sets.Get the confidence interval dataset.Plot the x and y data points using plot() method.Fill the area within the confidence interval ... Read More

Rishikesh Kumar Rishi
5K+ Views
To plot an imshow() image in 3D in Matplotlib, we can take the following steps −Create xx and yy data points using numpy.Get the data (2D) using X, Y and Z.Create a new figure or activate an existing figure using figure() method.Add an 'ax1' to the figure as part of ... Read More

Rishikesh Kumar Rishi
1K+ Views
To add extra contour lines using Matplotlib 2D contour plotting, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create e a function f(x, y) to get the z data points from x and y.Create x and y data points using ... Read More