Python Interview Questions Set - 16 Released
Intermediate Level How to merge two DataFrames on a common column? df1 = pd.DataFrame({"A":[1,2,3], "B":[11,12,13]}) df2 = pd.DataFrame({"A":[1,2,4], "B":[21,22,23]}) new_df = pd.merge(df1, df2, how='inner', on='A') new_df A B_x B_y 0 1 11 21 1 2 12 22 How to apply a function to each element...
Python Interview Questions Set - 15 Released
Intermediate Level How to create a NumPy array of evenly spaced values between a given range? arr = np.arange(10,100,5) arr How to create a DataFrame from a list of lists or list of tuples? data = [ [1,'Alice',88], [2, 'Bob',90], [3, 'Charlie',92] ] df =...
Python Interview Questions Set - 12 Released
Intermediate Level Calculate the multiplication and sum of two numbers a, b = map(int, input("Enter Two Numbers: ").split()) def printSumMulti(num1, num2): print(f"Sum is: {num1 + num2}") print(f"Multiplication is {num1*num2}") printSumMulti(a,b) Print the sum of the current number and the previous number in range ur_input =...
Python Interview Questions Set - 11 Released
Intermediate Level Write the python program to print the numbers in the range without using loops ur_input = int(input("Enter Some Number: ")) def printNums(num): if num > 0: printNums(num-1) print(num) printNums(ur_input) Write the python program to print the numbers in range in descening order without...
Python Interview Questions Set - 10 Released
Intermediate Level Write the python program to Check the occurrence of given character in string ur_input = input("Enter Some String: ") chr_to_check = input("Enter Some Character: ") res = ur_input.count(chr_to_check) Write the python program to print the multiplication table ur_input = int(input("Enter Some Number: "))...
Python Interview Questions Set - 9 Released
Intermediate Level Python Program to Reverse a Number ur_input = int(input("Enter Some Number:")) def reverseNumber(num): if type(num) == str: return int(num[::-1]) else: temp = 0 while num != 0: last_digit = num % 10 temp = temp * 10 + last_digit num //= 10 return...
Python Interview Questions Set - 6 Released
Intermediate Level Is Python case sensitive when dealing with identifiers? Yes. Python is case-sensitive when dealing with identifiers. It is a case sensitive language. Thus, variable and Variable would not be the same. How to create a new column in pandas by using values from...
Python Interview Questions Set - 5 Released
Intermediate Level What is __init__ in Python? _init_ methodology is a reserved method in Python aka constructor in OOP. When an object is created from a class and _init_ methodology is called to access the class attributes. What are the tools present to perform static...
Python Interview Questions Set - 3 Released
Intermediate Level What are Pandas? Pandas is an open-source python library that has a very rich set of data structures for data-based operations. Pandas with their cool features fit in every role of data operation, whether it be academics or solving complex business problems. Pandas...
Tableau Interview Questions Set - 4 Released
Intermediate Level Can we see SQL generated by Tableau Desktop? Tableau Desktop Log files are placed in C: UsersMy DocumentsMy Tableau Repository. In case of live connection to any data source, check the log file “log.txt” and “tabprotosrv.txt” files. In case of extract connection to...
Recent Comments
Archives
Categories
Categories
- Inspiration (1)
- Style (1)
- Technical Blog (18)
- Tips & tricks (2)
- Uncategorized (21)