<commit_before>Excercise Problems

##BASICS
Print "hello world!"
Declare vars "my_name" and "my_age"
print a dynamic statement "my name is DASH and my age is DASH"
Calculate the remainder when 27 is divided by 5
Calculate the quotient when 27 is divided by 5
How much is 27/5?
How much 2 to the power of 10
Declare a var called "my_number" and assign 43 to it
how much is my_number/5? (I'm expecting 8.6)
Declare a var called "my_bool" and assign FALSE to it
Write all the basic truth table operations (there are 4 is suppose)
Declare a var called "my_color" and assign a color of ur choice (between "RED" or "GREEN" or "BLUE")
If "my_color" is "RED" then print "my color is red"...if "my_color" is "GREEN" then print "my color is green"...and so on


##DATASTRUCTURES
Print range of numbers until 50 (it should start from zero)
Print range of numbers from 10 to 25 (it should start from 10)
Declare a var called "my_name" and assign ur name
Print 2 to 4 characters of ur name (for "vamsee"-expected:'ams')
Print ur name in reverse
Sort the characters in ur name and print it (expected:'aeemsv')
Create a list "my_colors" with atleast 4 colors
Join all the colors into a string with "_" between them (exp: "col1_col2_col3_col4")
Print in all upper case and all lower case of your my_name
Add a new color called "SPACE GRAY" to "my_colors"
In the list "my_color" for each color print their third character (use for loop)
In the list "my_color" for each color print their third character (use an inline for loop)
In the list "my_color" for each color print their third character (use map)
Create a list "my_num_list" and populate it with 10 random numbers between 1 to 100(look at from random import randint)
From the list "my_num_list", show all the elements <= 50 (use for loop)
From the list "my_num_list", show all the elements <= 50 (use an inline for loop)
From the list "my_num_list", show all the elements <= 50 (use map)
From the list "my_num_list", show all the elements <= 50 (use filter)
Create a list of 5 numbers([l1,l2..]), another list of 5 cities([m1,m2..]), another list of 5 animals([n1,n2..])...now create a tuple such that we get [(l1,m1,n1),(l2,m2,n2)...]
Create a dict "my_dict" of 5usernames with 5 passwords
For each key in "my_dict" print the 3 character in the password (use for loop)
For each key in "my_dict" print the 3 character in the password (use an inline for loop)
For each key in "my_dict" print the 3 character in the password (use map)
Delete a user from ur "my_dict"
Insert a new user in ur "my_dict"
Create a dict "my_dict2" where for the keys
	'A' -- Value is "my_dict"
	'B' -- Value is "my_num_list"
	'C' -- 'my_color'
Create a list of range of numbers from 0 to 500 and print every even value (exp: 0,2,4,6..)
Create a list of range of numbers from 0 to 500 and print every odd value (exp: 1,3,5,7..)
Create a list of range of numbers from 0 to 500 and print the second number from the end
Create a list of range of numbers from 0 to 500 and print every third number (exp: 0,3,6,9..)
There a list1 = ['a','a','a','b','b','b','b'], obtain unique vales in it (exp: ['a','b'])
There a list1 = ['a','a','a','b','b','b','b','c','c'] & list2 = ['c','d']
	obtain intersecting vals (exp: ['c'])
	obtain union of list
	obtain list1 - list2 unique vals (exp: ['a','b'])
	obtain list1 - list2 all vals (exp: ['a','a','a','b','b','b','b'])

##FUNCTIONS
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use for)
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use while)
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use recursion)
Write a function "fnAdd(x,y)" and return x+y
Write a function "fnAdd" which can take multi-length input and return added vals(exp: fnAdd(2,3,4)=9 & fnAdd(1,2,3,4,5)=15)
Write a function "fnStringManipulator(x)" which will take strings
	if there's ' = ' symbol it will replace with " in "
	if there's ' & ' symbol it will replace with " and "
	if there's any text in parenthesis brackets...it will remove it
	exp:
		'test string' --> 'test string'
		'age = 10 to 30' --> 'age in 10 to 30'
		'age = 10 to 30 & g=nder = "M"' --> 'age in 10 to 30 and g=nder in "M"'
		'age = 10 to 30 & (test1) & g=nder = "M" & (test2)' --> 'age in 10 to 30 and and g=nder in "M" and '
Add a Decorator to fnStringManipulator and fnAdd to know the exec time and rerun a test case for each of these funcs
Add one more Decorator to fnStringManipulator and fnAdd to achieve the following
	if fnStringManipulator is called: output should be "fnStringManipulator returned{0}".format(output)
	if fnAdd is called: output should be "fnAdd returned{0}".format(output)
	DONT HARDCODE these texts into the decorator as I might want you to add this decorator to a new func "fnSub" and it should automatically print "fnSub returned..."

##CLASSES
Write a class "myParentClass" and 
	initialize it by accepting a string
	add fnStringManipulator to it and make sure that it doesn't require any params for exec
	exp:
		mypc = myParentClass(x = 'age = 10 to 30')
		mypc.fnStringManipulator()
Write a class "myChildClass" by inheriting "myParentClass" and
	initialize it by accepting multiple numerical vals
	add fnAdd to it such that it doesn't need any params
	exp:
		mycc = myChildClass(2,40,6,'age = 10 to 30')
		mycc.fnAdd() (exp:48)
		mycc.fnStringManipulator() (exp:'age in 10 to 30')
	add First decorator to fnAdd and rerun
Write a class "myParentClass2" and 
	initialize it by accepting multiple numerical vals
	add fnMultiplier to it and make sure that it doesn't require any params for exec
	exp:
		mypc2 = myParentClass2(2,40,6)
		mypc2.fnMultiplier() (exp: 480)
Write a class "myChildClass2" by inheriting "myChildClass" and "myParentClass2"
	exp:
		mycc = myChildClass2(2,30,6,'age = 10 to 30')
		mycc.fnAdd() (exp:38)
		mycc.fnStringManipulator() (exp:'age in 10 to 30')
		mycc.fnMultiplier() (exp: 360)

##NUMPY
Create a numpy list X of 10 random numbers between 10 to 100
Create a numpy list Y of 10 random numbers between 10 to 100 with out replacement
Create Z which is sum of X, Y such that the resultant length of Z is also 10
Create K which is product of X, Y such that the resultant length of K is also 10
Create M by appending X to Y such that the resultant length of M is also 20
Create N by reshaping M into 2 dimensional array of shape (4, 5)
Create O by doing cross product of X, Y
Create P by doing dot product of X, Y

##PANDAS
Create a dataframe A with 10 rows and 3 cols by generating random numbers using numpy
Create a dataframe B by reading UniversalBank.csv
Create a dataframe C from first 10 rows of B
Print the dimensions of A, B & C
In C, make column "class" as categorical
Check the data types for B
Check the data types for C
Observe the difference in "class" data_type between B & C
Save to C to disk as a csv
Print first 3 rows of C
Print Columns names of C
Print Index values of C
Print head of only "class" column of C
Print tail of only "class" column of C
Print C's 4th row
Print C's 2nd col
Print C's 4th row - 3rd col value using iloc
Print C's 4th row - 3rd col value using loc
Print C's 4th row - 2nd, 4th & 5th col values using iloc
Print C's 4th row - 2nd, 4th & 5th col values using loc
Print C's 1st, 3rd & 4th row - 2nd, 4th & 5th col values using iloc
Print C's 1st, 3rd & 4th row - 2nd, 4th & 5th col values using loc
Understand the difference between iloc and loc
Create a Dataframe D by copying C's 1st, 3rd & 4th rows (ur creating a subset of C)
Add 10 to D's Age Column
Print head of D to verify whether age was incremented by 10
Print head of C and check whether the age col remained as is or not
Did C's Age column's values also got updated? could you explain the rationale?
Create a DataFrame E by copying C's 1st, 3rd & 4th rows in such a way that when we increment E's Age col...C's Age should remain unaffected
Set E's 4th row - 3rd col value to 99 using iloc
Set E's 4th row - 3rd col value to 199 using loc
Set E's 4th row to zero
Delete 2nd & 4th columns in E
Delete 2nd & 4th rows in E
Set E's 2nd col to -99
Print the data summary of C
Did it mention about "class" column
Create a Dataframe F by Transposing C<commit_msg>added excercises on sort and merge tasks<commit_after>Excercise Problems

##BASICS
Print "hello world!"
Declare vars "my_name" and "my_age"
print a dynamic statement "my name is DASH and my age is DASH"
Calculate the remainder when 27 is divided by 5
Calculate the quotient when 27 is divided by 5
How much is 27/5?
How much 2 to the power of 10
Declare a var called "my_number" and assign 43 to it
how much is my_number/5? (I'm expecting 8.6)
Declare a var called "my_bool" and assign FALSE to it
Write all the basic truth table operations (there are 4 is suppose)
Declare a var called "my_color" and assign a color of ur choice (between "RED" or "GREEN" or "BLUE")
If "my_color" is "RED" then print "my color is red"...if "my_color" is "GREEN" then print "my color is green"...and so on


##DATASTRUCTURES
Print range of numbers until 50 (it should start from zero)
Print range of numbers from 10 to 25 (it should start from 10)
Declare a var called "my_name" and assign ur name
Print 2 to 4 characters of ur name (for "vamsee"-expected:'ams')
Print ur name in reverse
Sort the characters in ur name and print it (expected:'aeemsv')
Create a list "my_colors" with atleast 4 colors
Join all the colors into a string with "_" between them (exp: "col1_col2_col3_col4")
Print in all upper case and all lower case of your my_name
Add a new color called "SPACE GRAY" to "my_colors"
In the list "my_color" for each color print their third character (use for loop)
In the list "my_color" for each color print their third character (use an inline for loop)
In the list "my_color" for each color print their third character (use map)
Create a list "my_num_list" and populate it with 10 random numbers between 1 to 100(look at from random import randint)
From the list "my_num_list", show all the elements <= 50 (use for loop)
From the list "my_num_list", show all the elements <= 50 (use an inline for loop)
From the list "my_num_list", show all the elements <= 50 (use map)
From the list "my_num_list", show all the elements <= 50 (use filter)
Create a list of 5 numbers([l1,l2..]), another list of 5 cities([m1,m2..]), another list of 5 animals([n1,n2..])...now create a tuple such that we get [(l1,m1,n1),(l2,m2,n2)...]
Create a dict "my_dict" of 5usernames with 5 passwords
For each key in "my_dict" print the 3 character in the password (use for loop)
For each key in "my_dict" print the 3 character in the password (use an inline for loop)
For each key in "my_dict" print the 3 character in the password (use map)
Delete a user from ur "my_dict"
Insert a new user in ur "my_dict"
Create a dict "my_dict2" where for the keys
	'A' -- Value is "my_dict"
	'B' -- Value is "my_num_list"
	'C' -- 'my_color'
Create a list of range of numbers from 0 to 500 and print every even value (exp: 0,2,4,6..)
Create a list of range of numbers from 0 to 500 and print every odd value (exp: 1,3,5,7..)
Create a list of range of numbers from 0 to 500 and print the second number from the end
Create a list of range of numbers from 0 to 500 and print every third number (exp: 0,3,6,9..)
There a list1 = ['a','a','a','b','b','b','b'], obtain unique vales in it (exp: ['a','b'])
There a list1 = ['a','a','a','b','b','b','b','c','c'] & list2 = ['c','d']
	obtain intersecting vals (exp: ['c'])
	obtain union of list
	obtain list1 - list2 unique vals (exp: ['a','b'])
	obtain list1 - list2 all vals (exp: ['a','a','a','b','b','b','b'])

##FUNCTIONS
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use for)
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use while)
Write a function for fibonacci series "fnFib(x)" where x is number of values to be returned(use recursion)
Write a function "fnAdd(x,y)" and return x+y
Write a function "fnAdd" which can take multi-length input and return added vals(exp: fnAdd(2,3,4)=9 & fnAdd(1,2,3,4,5)=15)
Write a function "fnStringManipulator(x)" which will take strings
	if there's ' = ' symbol it will replace with " in "
	if there's ' & ' symbol it will replace with " and "
	if there's any text in parenthesis brackets...it will remove it
	exp:
		'test string' --> 'test string'
		'age = 10 to 30' --> 'age in 10 to 30'
		'age = 10 to 30 & g=nder = "M"' --> 'age in 10 to 30 and g=nder in "M"'
		'age = 10 to 30 & (test1) & g=nder = "M" & (test2)' --> 'age in 10 to 30 and and g=nder in "M" and '
Add a Decorator to fnStringManipulator and fnAdd to know the exec time and rerun a test case for each of these funcs
Add one more Decorator to fnStringManipulator and fnAdd to achieve the following
	if fnStringManipulator is called: output should be "fnStringManipulator returned{0}".format(output)
	if fnAdd is called: output should be "fnAdd returned{0}".format(output)
	DONT HARDCODE these texts into the decorator as I might want you to add this decorator to a new func "fnSub" and it should automatically print "fnSub returned..."

##CLASSES
Write a class "myParentClass" and 
	initialize it by accepting a string
	add fnStringManipulator to it and make sure that it doesn't require any params for exec
	exp:
		mypc = myParentClass(x = 'age = 10 to 30')
		mypc.fnStringManipulator()
Write a class "myChildClass" by inheriting "myParentClass" and
	initialize it by accepting multiple numerical vals
	add fnAdd to it such that it doesn't need any params
	exp:
		mycc = myChildClass(2,40,6,'age = 10 to 30')
		mycc.fnAdd() (exp:48)
		mycc.fnStringManipulator() (exp:'age in 10 to 30')
	add First decorator to fnAdd and rerun
Write a class "myParentClass2" and 
	initialize it by accepting multiple numerical vals
	add fnMultiplier to it and make sure that it doesn't require any params for exec
	exp:
		mypc2 = myParentClass2(2,40,6)
		mypc2.fnMultiplier() (exp: 480)
Write a class "myChildClass2" by inheriting "myChildClass" and "myParentClass2"
	exp:
		mycc = myChildClass2(2,30,6,'age = 10 to 30')
		mycc.fnAdd() (exp:38)
		mycc.fnStringManipulator() (exp:'age in 10 to 30')
		mycc.fnMultiplier() (exp: 360)

##NUMPY
Create a numpy list X of 10 random numbers between 10 to 100
Create a numpy list Y of 10 random numbers between 10 to 100 with out replacement
Create Z which is sum of X, Y such that the resultant length of Z is also 10
Create K which is product of X, Y such that the resultant length of K is also 10
Create M by appending X to Y such that the resultant length of M is also 20
Create N by reshaping M into 2 dimensional array of shape (4, 5)
Create O by doing cross product of X, Y
Create P by doing dot product of X, Y

##PANDAS
Create a dataframe A with 10 rows and 3 cols by generating random numbers using numpy
Create a dataframe B by reading UniversalBank.csv
Create a dataframe C from first 10 rows of B
Print the dimensions of A, B & C
In C, make column "class" as categorical
Check the data types for B
Check the data types for C
Observe the difference in "class" data_type between B & C
Save to C to disk as a csv
Print first 3 rows of C
Print Columns names of C
Print Index values of C
Print head of only "class" column of C
Print tail of only "class" column of C
Print C's 4th row
Print C's 2nd col
Print C's 4th row - 3rd col value using iloc
Print C's 4th row - 3rd col value using loc
Print C's 4th row - 2nd, 4th & 5th col values using iloc
Print C's 4th row - 2nd, 4th & 5th col values using loc
Print C's 1st, 3rd & 4th row - 2nd, 4th & 5th col values using iloc
Print C's 1st, 3rd & 4th row - 2nd, 4th & 5th col values using loc
Understand the difference between iloc and loc
Create a Dataframe D by copying C's 1st, 3rd & 4th rows (ur creating a subset of C)
Add 10 to D's Age Column
Print head of D to verify whether age was incremented by 10
Print head of C and check whether the age col remained as is or not
Did C's Age column's values also got updated? could you explain the rationale?
Create a DataFrame E by copying C's 1st, 3rd & 4th rows in such a way that when we increment E's Age col...C's Age should remain unaffected
Set E's 4th row - 3rd col value to 99 using iloc
Set E's 4th row - 3rd col value to 199 using loc
Set E's 4th row to zero
Delete 2nd & 4th columns in E
Delete 2nd & 4th rows in E
Set E's 2nd col to -99
Print the data summary of C
Did it mention about "class" column
Create a Dataframe F by Transposing C
Create a Dataframe X through the following code:
rs = np.random.RandomState(123)
X = pd.DataFrame({'city':rs.choice(['chennai','hyd','bang','delhi'],30),\
            'age':rs.choice(range(10,40),30),\
            'gender':rs.choice(['male','female'],30),\
            'xID': rs.choice(range(10,100),30)})
Create DataFrame X1 by ascending sort of gender in X
Create DataFrame X2 by descending sort of city in X
Create DataFrame X3 by ascending sort of gender and descending sort of city in X
Create DataFrame Y through the following code:
rs = np.random.RandomState(234)
Y = pd.DataFrame({'yID': rs.choice(range(10,100),30),\
			'score': rs.randn(30)})
Create DataFrame Z1 by merging X and Y (outer join..use id's as xID & yID)
Create DataFrame Z2 by merging X and Y (inner join)
Create DataFrame Z3 by merging X and Y (left join)
Create DataFrame Z4 by merging X and Y (right join)
Create DataFrame X4 from X but rename all column names by appending 1 (like city will become city1)
Create DataFrame Z5 by column binding X and X4 (no merging of id's required)
Create DataFrame Z6 by column binding X and Y (no merging of id's required)
Create DataFrame Z7 by row binding X and X4
Create a list Z8 = ['hyd',22,'male',99]
Create DataFrame Z9 by adding Z8 as an additional row to X4
Find mean of age column in X4 dataframe
Find the median of age column in X4 dataframe
Find the 20%ile, 40%ile, 60%ile of age column in X4 dataframe
Find the number of occurances of each city in the X4 dataframe
Find the gender distribution in each city for the X4 dataframe
Create a Dataframe X5 from X4 where gender column will only have 'm' and 'f' instead of 'male' and 'female' (use replace)
Create a Dataframe X6 from X4 where gender column will only have 'm' and 'f' instead of 'male' and 'female' (don't use replace)


















{'fraction_non_alphanumeric': 0.0815481057508858, 'fraction_numerical': 0.033578631779776505, 'mean_word_length': 4.1346207668625805, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1421030', 'n_tokens_mistral': 6289, 'n_tokens_neox': 5674, 'n_words': 3084}