Fintech Resource
Fintech Resource
Fintech Resource
Code
For Pandas: import pandas as pd
For matplotlib: impot matplotlib.pyplot as plt
For seaborn : import seaborn as sns
Code:
Cars_data=pd.read_csv(r’address in the computer where the file is saved’) …. The easiest way
is to copy from address bar of the windows as follow:
Cars_data=pd.read_csv(r’ C:\Users\hmushtaq002\Desktop\Data\CARSALES.csv’)
Code:
df1['Latest_Launch']=pd.to_datetime(df1['Latest_Launch'])
df1.info()
FINTECH PYTHON RESOURCE
Code
new=csales.rename(columns={'Model':'Company'})
Code
Code
csales.insert(2,'new_column',csales['Model'])
REPLACE
Code
replaced=csales.replace('Acura','replaced')
Further, to find duplicated values from the specific column then refer to Code 2 where it will revert
the duplicated values in the entire selected column.
Codes
Code 1: dup=csales.duplicated().sum()
Code 2: dup=csales[‘specific_column’].duplicated().sum()
GROUPBY (ICAP PAST PAPER) VERY IMPORTANT FUNCTION FOR ANALYZING DATA
a=csales.groupby('Manufacturer').sum()
a=csales.groupby('Manufacturer')[‘sales_in_thousand’].sum()
Code
To provide more clarity about how the code might be used, the follow code will help. In the given
below code No. of entries are counted which exceed value 100000.
gsales=fs.groupby('Manufacturer')
result=gsales.size()
print (result)
FINTECH PYTHON RESOURCE
REINDEXING
This code will reset the existing index and will create new index i.e in this case the new index
would show B D A C E
Code
df1.reindex([‘B’, ‘D’, ‘A’, ‘C’, ‘E’]))
This code will look for the top highest/lowest value from the selected column and give the entire
data for the highest/lowest values i.e In the below code the code will look for the top 5
highest/lowest from the column “Sales” and will give the data of all columns in respect of the
highest/lowest values from ‘Sales’.
Code:
This code will revert the maximum (largest) or smallest value form the selected column.
Code:
min_value=df['fees'].min()
max_value=df['fees'].max()
Code:
This code will help to select only specific rows and provide data from specific columns only.
Code:
print(df.loc[1:3, ['Name', 'Qualification']])
The code will revert the only rows which value/date is same as prescribed in the code.
Code:
specific_rows = car_sales_df[car_sales_df['Manufacturer'] == 'Ford']
print(specific_rows)
ASCENDING/DESCENDING ORDER
The following code will sort the rows in accordance with the selected column.
Code:
RENAME COLUMNS
DISCUSS WITH AQIB
Brief of the code:
Code
Indexing=csales.reset_index()
Indexing.columns = ['Manufacturer', 'Total_Sales_in_Thousands']
FINTECH PYTHON RESOURCE
The code will calculate the mean and median of the selected column in the csv file.
Code:
Mean=csales[‘sales’].mean()
median=csales[‘sales’].median()
Code:
df1.to_csv(‘new_filename.csv', index=False)
FINTECH PYTHON RESOURCE
GRAPHS
plt.legend(loc='upper right')
plt.show()
BAR GRAPH
Code:
plt.figure(figsize=(10, 6))
plt.bar(origin, revenue, color=['blue', 'orange', 'green'])
Import links to practice the basics for drawing the graphs which must be prepared before going to
exams:
Matplotlib Library
https://www.w3schools.com/python/matplotlib_intro.asp
FINTECH PYTHON RESOURCE
Ensure to complete the codes for different types of graphs i.e Bar Chart, Pie Chart, Scatter plot,
Histogram.
Other Libraries:
Pandas Library
https://www.w3schools.com/python/pandas/default.asp
NOTE:
PROGRAMMING PART
The above codes have been prepared based on the ICAP past paper of the recent attempt which
will surely help to understand the pattern of the past papers and will enable you people to be on
track without wasting time on unnecessary codes. Many above codes have been written on my
presumptions which were not asked by the ICAP but are extension to the ICAP questions.
THEORETICAL PART
Further, in respect of other part of the FINTECH (other than programing part) basic understanding
of the terminologies is must since the entire part will be MCQ’s based. Moreover, the competition
of this part is not possible (according to me) because the scope of the syllabus is sky and no
specific study material is provided, accordingly ICAP in the exam uses advanced terminologies
which we might not be able to understand but anyone will definitely gain passing marks from the
theoretical area based on the understandings of the lectures.
DISCLAMER:
The provided material is based on my recent attempt and the ICAP Model paper on FINTECH. It
is intended to serve as a guiding resource for understanding key concepts. Please note that this
material is not exhaustive. To ensure success in the exam, all candidates should verify the
completeness of their study material and syllabus coverage. The above codes have not been
checked for error which may result error while running code, accordingly, copy and paste the code
in chatgpt and you will get right code.
The above document is still in progress and will share the final version after completing further
important codes. Feel free to contact me to discuss the document and provide any suggestions
you may have on the subject matter.
Regards
Hamza Mushtaq
PwC Islamabad
Contact: 03420148917 (Only WhatsApp)