Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contents to Pandas.jsx #194

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 153 additions & 4 deletions src/Python_Library_Pages/Numpy/Intro-to-Numpy.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,162 @@
import React from "react";

const NumpyBasics = () => {
const containerStyle = {
fontFamily: 'Arial, sans-serif',
color: '#333',
maxWidth: '800px',
margin: '0 auto',
padding: '20px',
};

const heading1Style = {
textAlign: 'center',
fontSize: '36px',
fontWeight: 'bold',
margin: '20px 0',
};

const heading2Style = {
fontSize: '28px',
fontWeight: 'bold',
margin: '20px 0',
};

const heading3Style = {
fontSize: '24px',
fontWeight: 'bold',
margin: '20px 0',
};

const paragraphStyle = {
fontSize: '18px',
lineHeight: '1.6',
margin: '20px 0',
};

const listStyle = {
fontSize: '18px',
lineHeight: '1.6',
margin: '20px 0',
};

const linkStyle = {
color: '#007BFF',
textDecoration: 'none',
fontWeight: 'bold',
};

const italicStyle = {
fontStyle: 'italic',
};

return (
<div>
<h1>Introduction to NumPy</h1>
<div style={containerStyle}>
<header>
<h1 style={heading1Style}>NumPy: Exploring the World of Numerical Computing</h1>
</header>

<main>
<article>
<h2 style={heading2Style}>Efficient Numerical Computing</h2>
<p style={paragraphStyle}>
In the realm of data science and scientific computing, efficiently manipulating and processing large datasets is paramount. Enter NumPy, short for Numerical Python, a powerful Python library that supports large, multi-dimensional arrays and matrices. It also provides a wide range of mathematical functions for array operations. In this blog post, we'll explore NumPy's features and benefits.
</p>

<ul style={listStyle}>
<li>
<strong>Efficient Array Operations:</strong>
<ul style={listStyle}>
<li>NumPy's ndarray (n-dimensional array) object enables efficient array operations, making it faster and more memory-efficient than traditional Python lists.</li>
<li>Element-wise operations simplify complex mathematical calculations.</li>
</ul>
</li>
<li>
<strong>Broadcasting:</strong>
<ul style={listStyle}>
<li>NumPy allows operations on arrays of different shapes through broadcasting.</li>
<li>It automatically aligns smaller arrays with larger ones, enabling element-wise operations.</li>
</ul>
</li>
<li>
<strong>Mathematical Functions:</strong>
<ul style={listStyle}>
<li>NumPy provides a vast array of mathematical functions for tasks such as linear algebra, Fourier analysis, and statistics.</li>
<li>It's an essential tool for numerical computations.</li>
</ul>
</li>
<li>
<strong>Interoperability:</strong>
<ul style={listStyle}>
<li>NumPy seamlessly integrates with data analysis libraries like Pandas and visualization libraries like Matplotlib.</li>
<li>This enables efficient data processing and meaningful visualizations.</li>
</ul>
</li>
</ul>

<p style={paragraphStyle}>
<strong>Applications of NumPy</strong>
<br />
NumPy is indispensable in scientific and data analysis tasks, including data manipulation, statistical analysis, image processing, and machine learning. It's a crucial tool for working with large datasets and complex mathematical models.
</p>

<h3 style={heading3Style}>Exploring Further</h3>
<p style={paragraphStyle}>
NumPy serves as the foundation for many Python libraries used in scientific and data-intensive applications. It supports various data types, integrates with databases, and handles file I/O efficiently. Its flexibility and efficiency make it the ideal choice for numerical and data manipulation tasks.
</p>

<ul style={listStyle}>
<li>
<a href="https://numpy.org/doc/stable/" style={linkStyle}>Official NumPy Documentation</a>
</li>
<li>
<a href="https://numpy.org/devdocs/" style={linkStyle}>Latest Development Documentation</a>
</li>
</ul>
<h2 style={heading2Style}>Example: Working with NumPy</h2>
<p style={paragraphStyle}>
Here's an example of working with NumPy in a Python script. The script creates a NumPy array, performs a simple operation, and displays the result.
</p>

<pre style={listStyle}>
{`# Python script to work with NumPy
import numpy as np

# Create a NumPy array
arr = np.array([1, 2, 3, 4, 5])

# Perform a simple operation (multiply by 2)
result = arr * 2

# Print the result
print("Original array:")
print(arr)
print("\\nResult after multiplying by 2:")
print(result)
`}
</pre>

<p style={paragraphStyle}>
To run this script and see the output, execute the Python script in your Python environment with NumPy installed. Make sure to include the necessary import statement for NumPy in your script.
</p>

<p style={paragraphStyle}>
If you haven't already installed NumPy, you can do so using pip:
</p>

<pre style={listStyle}>
{'pip install numpy'}
</pre>
</article>
</main>

<p>Development can start for NumPy from here</p>
<footer style={italicStyle}>
<p style={paragraphStyle}>
NumPy is an essential tool for numerical computing and scientific data analysis. Its efficiency, extensive features, and wide-ranging applications make it a must-know for data scientists and Python developers. Install NumPy and unlock the potential of numerical computing in Python!
</p>
</footer>
</div>
);
};

export default NumpyBasics;
export default NumpyBasics;
130 changes: 125 additions & 5 deletions src/Python_Library_Pages/Pandas/Intro-to-Pandas.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,133 @@
import React from "react";

const PandasBasics = () => {
const containerStyle = {
fontFamily: 'Arial, sans-serif',
color: '#333',
maxWidth: '800px',
margin: '0 auto',
padding: '20px',
};

const heading1Style = {
textAlign: 'center',
fontSize: '36px',
fontWeight: 'bold',
margin: '20px 0',
};

const heading2Style = {
fontSize: '28px',
fontWeight: 'bold',
margin: '20px 0',
};

const paragraphStyle = {
fontSize: '18px',
lineHeight: '1.6',
margin: '20px 0',
};

const linkStyle = {
color: '#007BFF',
textDecoration: 'none',
fontWeight: 'bold',
};

const italicStyle = {
fontStyle: 'italic',
};

return (
<div>
<h1>Introduction to Pandas</h1>
<div style={containerStyle}>
<header>
<h1 style={heading1Style}>Pandas: Data Manipulation Made Easy</h1>
</header>

<main>
<article>
<h2 style={heading2Style}>Efficient Data Manipulation</h2>
<p style={paragraphStyle}>
When it comes to data manipulation and analysis in Python, Pandas is a go-to library. It provides easy-to-use data structures and data analysis tools. In this blog post, we'll explore Pandas and its features.
</p>

<p style={paragraphStyle}>
<strong>Key Features of Pandas</strong>
<br />
Pandas offers a range of features that make data manipulation efficient and intuitive:
</p>

<ul style={paragraphStyle}>
<li>
<strong>Data Structures:</strong> Pandas introduces two primary data structures, Series (1D) and DataFrame (2D), for handling data.
</li>
<li>
<strong>Data Cleaning:</strong> It provides methods for handling missing data and cleaning messy datasets.
</li>
<li>
<strong>Data Transformation:</strong> You can perform various operations like merging, reshaping, and pivoting data effortlessly.
</li>
<li>
<strong>Data Analysis:</strong> Pandas offers tools for data exploration, aggregation, and statistical analysis.
</li>
</ul>

<p style={paragraphStyle}>
Whether you are dealing with structured data, time series, or messy real-world datasets, Pandas simplifies the process.
</p>

<p>Development can start for Pandas from here</p>
<h2 style={heading2Style}>Exploring Further</h2>
<p style={paragraphStyle}>
Pandas is widely used in data analysis, scientific research, and machine learning projects. It seamlessly integrates with libraries like NumPy and Matplotlib for advanced data analysis and visualization.
</p>

<ul style={paragraphStyle}>
<li>
<a href="https://pandas.pydata.org/docs/" style={linkStyle}>Official Pandas Documentation</a>
</li>
<li>
<a href="https://pandas.pydata.org/pandas-docs/stable/getting_started/index.html" style={linkStyle}>Getting Started with Pandas</a>
</li>
</ul>

<h2 style={heading2Style}>Example: Data Manipulation with Pandas</h2>
<p style={paragraphStyle}>
Here's a simple example of using Pandas to load a CSV file, perform basic operations, and display the data.
</p>

<pre style={paragraphStyle}>
{`# Python script to work with Pandas
import pandas as pd

# Load a CSV file
data = pd.read_csv('example.csv')

# Display the first few rows
print(data.head())
`}
</pre>

<p style={paragraphStyle}>
To run this script, ensure you have Pandas installed in your Python environment and replace 'example.csv' with the path to your CSV file.
</p>

<p style={paragraphStyle}>
If you haven't already installed Pandas, you can do so using pip:
</p>

<pre style={paragraphStyle}>
{'pip install pandas'}
</pre>
</article>
</main>

<footer style={italicStyle}>
<p style={paragraphStyle}>
Pandas simplifies data manipulation and analysis in Python. Whether you are a data scientist, analyst, or Python developer, mastering Pandas is essential for working with data efficiently. Install Pandas and start exploring the world of data manipulation!
</p>
</footer>
</div>
);
};

export default PandasBasics;
export default PandasBasics;