0% found this document useful (0 votes)
25 views37 pages

Naitik Jain 12th IP Project

Uploaded by

Varun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views37 pages

Naitik Jain 12th IP Project

Uploaded by

Varun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Import and Export of India

with Russia

IP Project File
By
NAITIK JAIN
XII-B
Index
● Certificate
● Acknowledgement
● Hardware and software
requirements
● Introduction
● Source Code
● Outputs
● Bibliography
CERTIFICATE
This is to certify that Naitik Jain is a
student of XII - B. He has successfully
prepared her IP Project titled "Imports
and Exports of India with Russia" as per
the guidelines of Central Board of
Secondary Education (CBSE) for the
year. It is further certified that this
project is the individual and bona fide
work of the candidate.

Mr. DINESH SIR


(INFORMATICS PRACTICES)
Acknowledgement
I would like to convey my heartfelt
thanks to Mr. Dinesh, our Informatics
Practices teacher who always gave
valuable suggestions and guidelines for
completion of my project. I do not have
enough words to express my gratitude
towards this esteemed institution
especially our respective teacher, who
makes real education alive in this
commercial atmosphere.

NAITIK JAIN
XII -B
Hardware & Software
Requirements
Minimum Hardware and Software
Requirements:
Operating System:
x86 64-bit CPU (Intel / AMD
architecture)
4 GB RAM.
5 GB free disk space.
Open Source Software being used:
1. Python 3.12
a. Pandas
b. Matplotlib
Features of project:
1. Free of technical errors.
2. Time saving.
3. Reduces manual work.
4. Data is easily analysed through various
methods. Ex: sort (), group by, mean, median,
mode etc.
5. Visualised data. Ex: Bar chart, Scatter chart,
Histogram etc.
6. User friendly interface.

Python as Front-End:
Python is a simple, open-source and object-
oriented coding language. It is one of the
programming languages that are easy to learn as
it is a dynamic type, high-level, and interpreted
coding language. Python language supports a
cross-platform operating system that is used to
build different applications that create a more
convenient environment for the users.
Data Visualization and Data
Science:
Using extracted data and Python libraries like NumPy,
Pandas, one can study information that you have and
can easily perform several operations. For data
visualization, there are different libraries like Seaborn,
Matplotlib all are used to plot graphs and charts. This is
one of the Python features that is used by the data
scientists.

Conclusion: Python is one of the simple


programming languages that is used for a variety of
applications.
PYTHON FEATURES:

1. Python is compact and very easy to use object-


oriented language.
2. Python is an expressive language – fewer line of
codes and simpler syntax
3. It is an interpreted language not a compiled
language
4. Python can run equally well on variety of platforms
like windows, LINUX/UNIX, etc.
5. Python language is freely available along with its
source code
6. Python has evolved into a powerful, complete and
useful language over these years.
CSV as Back-End:
CSV stands for Comma Separated Values. It is a popular
way of representing and storing tabular, column-
oriented data in a persistent storage.
It’s very simple and contains only text, separated by
commas, or a long text with strings and lines or some
other definite character.
It helps files to be easily transferred and transformed
into any other format that you need. It is used When
data has a strict tabular structure or to transfer
large database between programs.

CSV FEATURES:
1. CSV is human readable and easy to edit manually.
2. CSV is simple to implement and parse.
3. CSV is processed by almost all existing applications.
4. CSV provides a straightforward information schema.
5. CSV is faster to handle.
6. CSV is smaller in size.
Comma Separated
Values (CSV)
Coding
import pandas as pd
import matplotlib.pyplot as plt

# Load the CSV file


file_path = 'path_to_your_csv_file.csv' # Update this
to your actual file path
df = pd.read_csv('trade.csv')

# Menu-driven program
while True:
print("\n--- Main Menu ---")
print("1. Display Data")
print("2. Access Data")
print("3. Data Manipulation")
print("4. Data Analysis")
print("5. Data Visualization")
print("6. Exit")
choice = input("Enter your choice: ")

if choice == '1':
# Display Data
print("\n--- Displaying Data ---")
print(df)
print("\n--- Displaying first 5 rows ---")
print(df.head())
print("\n--- Displaying last 5 rows ---")
print(df.tail())
print("\n--- Displaying columns ---")
print(df.columns)
print("\n--- Displaying Data Types ---")
print(df.dtypes)

elif choice == '2':


# Access Data
print("\n--- Access Data ---")
print("1. Access a specific column")
print("2. Access a specific row")
print("3. Access multiple rows by index")

# Hardcoded choices for access simulation


access_choice = input("Enter your choice")

if access_choice == '1':
column = input("Enter the column name you
want to access: ")
if column in df.columns:
print(df[column])
else:
print(f"Column '{column}' not found!")

elif access_choice == '2':


row = int(input("Enter the row number you
want to access: "))
if row in range(len(df)):
print(df.iloc[row])
else:
print(f"Row '{row}' is out of range!")
elif access_choice == '3':
start = int(input("Enter the starting row index:
"))
end = int(input("Enter the ending row index: "))
if start in range(len(df)) and end in
range(len(df)):
print(df.iloc[start:end])
else:
print(f"Row range '{start}-{end}' is out of
bounds!")
else:
print("Invalid choice!")

elif choice == '3':


# Data Manipulation
print("\n--- Data Manipulation ---")
print("1. Drop a Column")
print("2. Rename a Column")
print("3. Replace Specific Values")
# Hardcoded choices for data manipulation
simulation
manipulate_choice = input("Enter your choice") #
Change this to '2', '3', or '4' to simulate different
manipulations

if manipulate_choice == '1':
column_to_drop = input("Enter the column
name you want to drop: ")
if column_to_drop in df.columns:
df = df.drop(columns=[column_to_drop])
print(f"\nColumn '{column_to_drop}'
dropped.")
print(df)
else:
print(f"Column '{column_to_drop}' not
found!")

elif manipulate_choice == '2':


old_name = input("Enter the current column
name to rename: ")
new_name = input("Enter the new column
name: ")
if old_name in df.columns:
df.rename(columns={old_name: new_name},
inplace=True)
print(f"\nColumn '{old_name}' renamed to
'{new_name}'.")
print(df)
else:
print(f"Column '{old_name}' not found!")
elif manipulate_choice == '3':
# Replace specific values in the DataFrame
column_to_replace = input("Enter the column
name to replace values: ")
if column_to_replace in df.columns:
old_value = input(f"Enter the old value to
replace in '{column_to_replace}': ")
new_value = input(f"Enter the new value to
replace with: ")
df[column_to_replace] =
df[column_to_replace].replace(old_value, new_value)
print(f"\nValues in column
'{column_to_replace}' updated from {old_value} to
{new_value}.")
print(df)
else:
print(f"Column '{column_to_replace}' not
found!")
else:
print("Invalid choice!")

elif choice == '4':


# Data Analysis
print("\n--- Data Analysis ---")
print("1. Shape of the DataFrame")
print("2. Sort Data by Trade Balance")
print("3. Transpose the DataFrame")

# Hardcoded choices for data analysis simulation


analysis_choice = input('Enter your choice') #
Change this to '2', '3', or '4' for different analysis
if analysis_choice == '1':
shape = df.shape
print(f"\nShape of the DataFrame: {shape[0]}
rows and {shape[1]} columns")

elif analysis_choice == '2':


sorted_data = df.sort_values(by='Trade
Balance', ascending=False)
print("\nData sorted by Trade Balance
(descending):")
print(sorted_data[['Financial Year(start)', 'Trade
Balance']])
print(df)
elif analysis_choice == '3':
transposed_df = df.T
print("\nTransposed DataFrame:")
print(transposed_df)
else:
print("Invalid choice!")

elif choice == '5':


# Data Visualization
print("\n--- Data Visualization ---")
print("1. Export vs Import Over the Years")
print("2. Trade Balance Over the Years")
print("3. Histogram of Trade Balance")
print("4. Bar Chart of Trade")
# Hardcoded choices for data visualization
simulation
visualization_choice = input("Enter your choice") #
Change this to '2' or '3' for different visualization

if visualization_choice == '1':
plt.plot(df['Financial Year(start)'], df['Export'],
label='Export', marker='o')
plt.plot(df['Financial Year(start)'], df['Import'],
label='Import', marker='x')
plt.xlabel('Financial Year (Start)')
plt.ylabel('Amount (in million USD)')
plt.title('Export and Import Over the Years')
plt.legend()
plt.grid(True)
plt.show()

elif visualization_choice == '2':


plt.plot(df['Financial Year(start)'], df['Trade
Balance'], label='Trade Balance', marker='o',
color='orange')
plt.xlabel('Financial Year (Start)')
plt.ylabel('Trade Balance (in million USD)')
plt.title('Trade Balance Over the Years')
plt.legend()
plt.grid(True)
plt.show()

elif visualization_choice == '3':


# Histogram of Trade Balance
plt.hist(df['Trade Balance'], bins=10,
color='orange', edgecolor='black')
plt.xlabel('Trade Balance (in USD Millions)')
plt.ylabel('Frequency')
plt.title('Histogram of Trade Balance')
plt.grid(True)
plt.show()

elif visualization_choice == '4':


plt.bar(df['Financial Year(start)'], df['Export'],
label='Export', color='orange', width=0.4)
plt.bar(df['Financial Year(start)'], df['Import'],
label='Import', color='blue', width=0.4)
plt.xlabel('Financial Year (start)')
plt.ylabel('Value (in million USD)')
plt.title('India\'s Export and Import with Russia')
plt.legend()
plt.show()
else:
print("Invalid choice!")

elif choice == '6':


print("Exiting the program.")
break
else:
print("Invalid choice! Please try again.")
Output

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy