100 questions
You want to average the prices in the fruit list!I even extracted the price from the listI think I can use the sum, but it's stuck.fruit = [Apple, 1020] [Orange, 880] [Grape, 3160]sum=0for i in fruit:...
In Python, it says that to change the case of a string using the for statement, it should be the code below, but I don't know why it should be specified as new_text = str()!text = input('English case ...
data_list = [[apple, 5], [grape, 3], [apple, 2]]result_data = []check_list = []for item in data_list: if item[0] not in check_list: result_data.append(item) check_list.append(item[0]) else: for res...
Hello, Python. I'm a beginner at Panda's.Declare the entire data as F1I would like to declare it as data by dividing it 97 times by 2,000 eachThat is, F1_0 is from index number 0 to 1999, F1_1 is from...
Hello. I'm practicing split and For Moon, but there's a blockage.#1.for i in range(len(df)) : df_split1[i], df_split2[i]=df.loc[i].split(sep='.', maxsplit=1)#2.for i in range(len(df)) : df.loc[i, 'c']...
I want to change this code to a simple for statement, but I want to know how to change it.I want to know how to reduce it in other waysYo $(function(){ $('#main_a1').click(function(){ $('#main_conte...
Hello, I am an introvert who has been practicing split, for, and if moon recently.df = pd.DataFrame({idx5:[ ex1.x.1, ex1.x, ex2.x.2, ex2.x.3, ex1.x.2, ex2.x, ex2.x.4, ex2.x.5, ex1.x.3, ex3.x, ex2.x.6,...
Hello, I'm Python beginner who is learning Python dataframe.fori in range(len(df)) if df1.loc[i, idx1]==HELLO : cnt1=cnt1+1 num=i df2.loc[10, 'idx8'] = df.at[i,'IDX8']There's a code like this, but ...
I just started coding, so I have a question for j in range(len(list2)): for w in range(len(list2[0])): if list3[w] != list2[j][w]: new_list.append(list2[j][w])J = 0, 1 w = 0, 1, 2, 3, 4, 5We know th...
« | - 9 - | » |
© 2024 OneMinuteCode. All rights reserved.