Question
WE NEED THIS PYTHON CODE CONVERT TO PSEUDOCODE import pandas as pd path = rC:/Users/vip/Desktop/project/pcr_data.csv data = pd.read_csv(path) data = data.astype(str) def readlist(): with open(pcr_data.csv,'r')
WE NEED THIS PYTHON CODE CONVERT TO PSEUDOCODE
import pandas as pd
path = r"C:/Users/vip/Desktop/project/pcr_data.csv"
data = pd.read_csv(path)
data = data.astype(str)
def readlist():
with open("pcr_data.csv",'r') as csvfile:
reader = csv.reader(csvfile)
dataList = []
for row in reader:
dataList.append(row)
return dataList
start_time = time.perf_counter()
def editDistance(str1, str2, m, n):
if m == 0: return n
if str1[m-1] == str2[n-1]:
return editDistance(str1, str2, m-1, n-1)
return 1 + min(editDistance(str1, str2, m, n-1), editDistance(str1, str2, m-1, n), editDistance(str1, str2, m-1, n-1) )
str2 = data.loc[100]
print("String 2 : ",list(str2))
print ("Edit Distance By Using LIST : " , editDistance(str1, str2, len(str1), len(str2)))
print("Time Taken Is : ", end_time - start_time , "Second")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started