- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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 1162 Articles
Rishikesh Kumar Rishi
36K+ Views
Using plt.savefig("myImagePDF.pdf", format="pdf", bbox_inches="tight") method, we can save a figure in PDF format.StepsCreate a dictionary with Column 1 and Column 2 as the keys and Values are like i and i*i, where i is from 0 to 10, respectively.Create a data frame using pd.DataFrame(d), d created in step 1.Plot the ... Read More
Rishikesh Kumar Rishi
29K+ Views
We can use the .corr() method to get the correlation between two columns in Pandas. Let's take an example and see how to apply this method.StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print the input DataFrame, df.Initialize two variables, col1 and col2, and assign them the columns that you ... Read More
Rishikesh Kumar Rishi
34K+ Views
To hide axes (X and Y) and gridlines, we can take the following steps −Create x and y points using numpy.Plot a horizontal line (y=0) for X-Axis, using the plot() method with linestyle, labels.Plot x and y points using the plot() method with linestyle, labels.To hide the grid, use plt.grid(False).To hide the axes, ... Read More
Rishikesh Kumar Rishi
31K+ Views
To remove or hide X-axis labels from a Seaborn / Matplotlib plot, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Use sns.set_style() to set an aesthetic style for the Seaborn plot.Load an example dataset from the online repository (requires Internet).To hide ... Read More
Rishikesh Kumar Rishi
39K+ Views
To turn off the ticks and marks of a matplotlib axes, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y data points using plot() method.Get the current axis of the ... Read More
Rishikesh Kumar Rishi
34K+ Views
To create line segments between two points in matplotlib, we can take the following stepsSet the figure size and adjust the padding between and around the subplots.To make two points, create two lists.Extract x and y values from point1 and point2.Plot x and y values using plot() method.Place text for ... Read More
Rishikesh Kumar Rishi
36K+ Views
To extract CSV file for specific columns to list in python, we can use Pandas read_csv() method.StepsMake a list of columns that have to be extracted.Use read_csv() method to extract the CSV file data into a data frame.Print the exracted data.Plot the data frame using plot() method.To display the figure, ... Read More
Rishikesh Kumar Rishi
35K+ Views
To change the font size of xticks in a matplotlib plot, we can use the fontsize parameter.StepsImport matplotlib and numpy.Set the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot the x and y data points using plot() method.Set the font ... Read More
Rishikesh Kumar Rishi
36K+ Views
To get the nth row in a Pandas DataFrame, we can use the iloc() method. For example, df.iloc[4] will return the 5th row because row numbers start from 0.StepsMake two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print input DataFrame, df.Initialize a variable nth_row.Use iloc() method to get nth row.Print the returned ... Read More
Rishikesh Kumar Rishi
71K+ Views
To change the range of X and Y axes, we can use xlim() and ylim() methods.StepsSet the figure size and adjust the padding between and around the subplots.Create x and y data points using numpy.Plot x and y data points using plot() method.Set the X and Y axes limit.To display ... Read More