split tag

25 questions


2 answers
68 views
0
Is there a way to divide it into two using split and for statement and save it as a new data frame?

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']...

2 years ago

1 answers
92 views
0
How can split be used for things that are slightly different in form (?) from each other using split, for, etc.?

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,...

2 years ago

1 answers
93 views
0
File name split

dt_list = glob('*.jpeg')dt_list1 = str(dt_list('_'))AttributeError: 'list' object has no attribute 'split' There is an error when I load the picture file and split the name string, do you know how?

2 years ago

2 answers
92 views
0
Python split question.

import retext = 'tls_0925_13)'pattern = re.compile(r'\w\d+')s = str(re.findall(pattern, text))print(s) #Output ['_13]k = text.split(s)print(k) #Output ['tls_0925_13);']tls_0925 I wanted to extract thi...

2 years ago

1 answers
91 views
0
Python Dictionary Split Questions

Hello!Movie_data.txt is filled with data such as movie name, company, release date, etc., and I called this notepad and separated it by '|' and saved it in a dictionary called mydict.mydict = {}fp=ope...

2 years ago
« - 3 -

© 2024 OneMinuteCode. All rights reserved.