0% found this document useful (0 votes)
9 views13 pages

Bank Management System Functions

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

Bank Management System Functions

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import pandas as pd

import [Link] as plt

def Menu():

print()

print("*****************************************************************************
*******")

print(" BANK MANAGEMENT SYSTEM ")

print("*****************************************************************************
*******")

print()

print(" 0. Know about the Project ")

print(" 1. Reading File Bank ")

print(" 2. Reading File bank without index")

print(" 3. Add details of new Account Holder")

print(" 4. Delete Account if it is closed")

print(" 5. Balance Enquiry ")

print(" 6. Read a Few records")

print(" 7. Read 2 records from Top and 2 from bottom")

print(" 8. Arrange details in Ascending order by Name of Accounts")

print(" 9. Maximum Balance from all accounts in Bank")

print(" 10. Reading file Account")

print(" 11. Depsit in Account")

print(" 12. Withdrawl from Account")

print(" 13. line Plot")

print(" 14. Line1 Plot")

print(" 15. Bar1 PLot")

print(" 16. Barh Plot")

print(" 17. Barh1 Plot")

print()
print("*****************************************************************************
********")

Menu()

def about():

print("IN the BANK MANAGEMENT SYSTEM Project there are 2 CSV files Named as\

Bank and Account. There are 17 Options including 5 plots")

def Bankcsv():

print("Reading File Bank")

print()

df=pd.read_csv("C:\\Desktop\\Bank [Link]",index_col=0)

print(df)

def No_index():

df=pd.read_csv("C:\\Desktop\\Bank [Link]",index_col=0)

print("Withot_index")

print()

print()

print(df)

def New_accholder():

print("Adding new Account Holder in File Account")

print()

df=pd.read_csv("C:\\Desktop\\Account [Link]",index_col=0)
print(df)

print()

print()

df1=[Link](data={"Accno":"4044","Name":"Anaya","Debit":"960",

"Credit":"6000","Balance":"90000"},

name="x")

df=[Link](df1,ignore_index=True)

print(df)

def removeacc():

print("Deleting Account Holder from File Account")

df=pd.read_csv("C:\\Desktop\\Account [Link]",index_col="Accno")

print(df)

Accno=int(input("Enter account No.:-"))

[Link](Accno,axis=0,inplace=True)

print(df)

def Balenquiry():

print("Display only account no.,Name and Balance")

df=pd.read_csv("C:\\Desktop\\Bank [Link]",usecols=["Accno","Name","Balance"])

print(df)

def read_rows():

print("Show only a Few Records")


df=pd.read_csv("C:\\Desktop\\Bank [Link]",nrows=2)

print("Show 2 records")

print(df)

def top_bottom():

print("Show only a few records from top and bottom")

df=pd.read_csv("C:\\Desktop\\Bank [Link]")

print("Top 2 records")

print([Link](2))

print()

print()

print("Last 2 records")

print([Link](2))

def sort_names():

print("Sorting Account Holders names in Ascending order")

df=pd.read_csv("C:\\Desktop\\Bank [Link]",index_col=0)

df=df.sort_values("Name")

print(df)

def maxbal():

df=pd.read_csv("C:\\Desktop\\Bank [Link]")

print(df)
print("Highest Balance")

print([Link]())

def Accountread():

print("Reading file account")

print()

print()

df=pd.read_csv("C:\\Desktop\\Account [Link]",index_col=0)

print(df)

def Deposit():

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print("Previous Statement")

print(df)

print("------------------------------------------------------------------")

[Link][df["Accno"]==4040,["Credit"]] =df["Credit"]+ 4000

df["Balance"]=df[["Debit","Credit"]].diff(axis=1).iloc[:,1].cumsum().astype(int)

print(df)

def Withdrawl():

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print("Previous statement")

print()

print(df)

print()

[Link][df["Accno"]==4041,["Debit"]]=df["Debit"]-3000
print()

df["Balance"]=df["Balance"]-3000

print(df)

def Line1_plot():

print("Line PLot")

df=pd.read_csv("C:\\Desktop\\Bank [Link]")

print(df)

x=df["Name"]

y=df["Balance"]

[Link]("Balance of account Holders")

[Link](x,y,marker="X",ls="dashed",linewidth=4,color="b")

[Link]()

def Bar_Plot():

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print(df)

[Link](df["Accno"],df["Balance"],marker="o",label="Fare")

[Link]("Flight wise fare")

[Link]("Accno")

[Link]("Balance")

[Link](rotation=30)

[Link]()

[Link](True)

[Link]()
def Bar1_plot():

print("Bar plot")

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print(df)

x=df["Name"]

y=df["Balance"]

[Link]("Balance of account holders")

[Link]("Name")

[Link]("Balance")

[Link](x,y,color=["green","orange"])

[Link]()

def Barh_plot():

print("Horizontal bar plot")

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print(df)

x=df["Name"]

y=df["Balance"]

[Link]("Cured in various states and UT")

[Link]("Name")

[Link]("Balance")

[Link](x,y,color="#00BFFF",edgecolor="k")

[Link]()

def Barh1_plot():
print("Horizontal bar plot")

df=pd.read_csv("C:\\Desktop\\Account [Link]")

print(df)

x=df["Name"]

y=df["Balance"]

[Link]("Debit and Credit")

[Link]("Name")

[Link]("Balance")

[Link](x,y,color="blue",edgecolor="k")

[Link]()

opt=""

opt=int(input("Enter your choice :- "))

if opt==0:

about()

elif opt==1:

Bankcsv()

elif opt==2:

No_index()

elif opt==3:

New_accholder()

elif opt==4:

removeacc()

elif opt==5:

Balenquiry()

elif opt==6:

read_rows()
elif opt==7:

top_bottom()

elif opt==8:

sort_names()

elif opt==9:

maxbal()

elif opt==10:

Accountread()

elif opt==11:

Deposit()

elif opt==12:

Withdrawl()

elif opt==13:

Line1_plot()

elif opt==14:

Bar_Plot()

elif opt==15:

Bar1_plot()

elif opt==16:

Barh_plot()

elif opt==17:

Barh1_plot()

else:

print("INVALID OPTION")

print("\a")

Common questions

Powered by AI

The system processes deposits by first reading the 'Account' CSV file into a dataframe. It then locates the account using the account number, updates the 'Credit' column by adding the deposit amount, and recalculates the balance by computing the difference between 'Debit' and 'Credit' columns cumulatively, ensuring the updated balance is accurate .

A horizontal bar plot allows bank management to quickly assess and compare the balances of different accounts visually, highlighting variances that might require attention. The plot is configured by setting the account holder names on the y-axis and their balances on the x-axis, using distinct colors for clarity .

Offering CSV operations facilitates robust data management, allowing for detailed account manipulation like adding, deleting, and updating entries. Complementing this with visual data representations, such as plots, augments analytical capabilities by uncovering trends, comparisons, and exceptions visually, providing a comprehensive toolkit for both operational efficiency and strategic decision-making .

Balance enquiries are processed by reading the 'Bank' CSV file and selecting only the columns related to account number, name, and balance. This provides a focused view of the relevant financial data, allowing users to retrieve balance information without exposing unnecessary details .

In the BANK MANAGEMENT SYSTEM, a new account holder is added by first reading the 'Account' CSV file using Pandas. A new series representing the account holder's details, such as account number, name, debit, credit, and balance, is created. This series is then appended to the existing dataframe, updating the account records .

The inclusion of both line graphs and bar plots provides versatility in data visualization. Line graphs are useful for showing trends over time or comparisons among groups, while bar plots are effective for comparing quantities across different categories. These visual tools enhance understanding of data patterns and relationships in banking operations .

During withdrawals, the system reads the 'Account' file into a dataframe, identifies the specific account using its number, and safely decrements the 'Debit' column before updating the balance to reflect the transaction. These operations are conducted in-memory using Pandas, reducing the risk of data corruption during file IO processes, thereby enhancing security .

The process involves reading the 'Bank' file into a dataframe and using the sort_values method on the 'Name' column to arrange account holder details in ascending order. This sorting facilitates easier searching and presentation of account information, enhancing data accessibility and readability .

When removing an account holder, the system first reads the 'Account' CSV file into a dataframe. The user is prompted to input the account number of the holder to be removed. The system then drops the corresponding row from the dataframe using Pandas' drop method along the specified axis, which ensures the data integrity of remaining records .

The system determines the maximum account balance by loading the 'Bank' CSV file into a dataframe and using the max() function on the 'Balance' column. It then displays the highest balance found .

You might also like