This code base is created with a goal of creating a knowledge base and uniform coding practices/habits among the developers therby aiding easier learning and collaboration
- python - for running python
- Visual Studio Code / VS Code - code editor for python code
- git - source control system for managing python code
- Opened a folder in vs code
- Created a new python file
- print hello world using 'print' function in python
- commenting python code using '#'
- multi line commenting of python code using '''
- create variables (like strings and numbers) in python
- formatting strings with variable substitution in python
- if, else, elif in python
- while statement in python
- for statement in python
- intro to using git
Ctrl /to comment /uncomment codeAlt Shift Fto format the codeCtrl sto save filesCtrl +to zoom in,Ctrl -to zoom outCtrl ~to open/close command prompt
- find the length of list using 'len' function
- access a list item using its zero-indexed position
- append a value to a list using 'append' function
- append a list of values using 'extend' function
- insert a value at a desired position in the list using 'insert' function
- find the position of a value in a list using 'index' function
- create a list from another list using 'list comprehension' with filtering only numbers
- adding numbers to a list repeatedly using 'for' loop and 'append' functions
- sort the list of values using the 'sorted' function
- sort the list of values in descending order using the 'sorted' function with reverse input as True
- clone the original list to another variable using 'copy' module
- slicing the list
- clone the list using copy module
- reverse a list using 'reverse' function
- use
# %%to create a jupyter cell in python code
- use 'type' function to get the type of variable
- check the type of variable using 'isinstance' function
- create an example dictionary
- access all the keys of a dictionary using 'keys' function
- access all the values of a dictionary using 'values' function
- get all the values types of dictionary into an array using list comprehension
- inserting/editing a key-value pair in a dictionary
- accessing dictionary values
- get all desired command line inputs into an object
- Intro and terminologies in a pandas dataframe
- create a dataframe from list of lists
- read dataframe from a csv/excel file using 'read_csv', 'read_excel' function
- get all the column names of the dataframe using the 'columns' attribute
- get all the items of a specific column name
- filtering the rows of a dataframe based upon its column values
- Pandas dataframe excel/csv loading options sheet_name, skiprows, skipfooter, nrows, usecols
- get the shape of dataframe in the form (nrows, ncols) using shape attribute
- Pandas export csv or excel using 'to_csv', 'to_excel' methods
- using iloc function to access a cell of dataframe by its index adress
- using iloc function to access a subset of dataframe by its index and column adress ranges
- pandas loc function to access dataframe data by specifying the row index values or column values
- make a column as index in a pandas DataFrame
- calculate average value of a dataframe column using mean() function
- calculate sum of a dataframe column using sum() function
- calculate aggregation of dataframe using 'for' loop
- create a new column in a dataframe
- Basic line plot
- set title for the plot
- set label to x and y axes
- enable legends for the plot
- control the location of legends in the plot
- save the figure as png/pdf/jpg using savefig function
- changing color of the line plot
- changing linestyle can be 'solid', 'dashed', 'dashdot', 'dotted', 'None'
- plot markers in the plot
- control plot markers style and size
- Multiple lines in one plot using ax.plot function
- use subplots function to create multiple plots in one figure
- iterate through each axis through reshape
- set the figure title
- using figsize option in subplots function to control size in inches
- hiding/changing the color of spines
- setting the position of spines
functions and variables in diffrerent files and folders for implementing Separation of Concerns paradigm
- iterate through all the files of a folder
- iterate through all the files of a desired file extension in a folder
- using read mode, write mode, append mode while reading and writing files
- get the current time
- create a desired datetime object using dt.datetime function
- using strftime to print datetime in a desired format like %d-%m-%Y %H:%M:%S
- using strptime to derive datetime object from string
- convert string type pandas dataframe column to datetime column
- access the components of a datetime object
- create a desired time interval using dt.timedelta function
- get the difference between 2 datetimes
- access the components of a timedelta object
- get the total seconds in the time span using total_seconds function
- add time period to existing time period