Tag: Split
Posts of Tag: Split
  1. .split in IE 7 not working

    I am trying to split an AJAX response with .split() in IE 7 and i am just getting Object doesn't support this property or method, I am using the following code: info = data.split("&"); Where data ...Learn More
  2. Splitting a text file

    I have a folder with a set of text documents. I want to split each document to two or three documents, each one should be 45-70kb. How сan I do it? I tried: def split_file(filename, pattern, size): with ope...Learn More
  3. Split string and append parts in running list [Python]

    I have a veery long list that contains the same pattern. Here an original example: 04:50 10 244.685 0 0 05:00 10 244.680 0 0 HBCHa 9990 Seite 762 16.02.16 Hafenpegel Pegel müM Var 0 Pegelstand Datum Zeit Inter...Learn More
  4. Splitting a line, then searching for string

    sry im still new to python. My complete code so far: for line in file: line = line.split("\t") if my_var in line[1]: print line[13] What the program should do, is reading lines from a file. the...Learn More
  5. Extract rows and save to multiple csv files

    I am trying to solve the following problem using Python: I've a table (csv) from which I want to extract consecutively row 1 + 2, then row 1 + 3, then row 1 + 4, etc. The extracts should be saved again as csv f...Learn More
  6. parsing a url in python with changing part in it

    I'm parsing a url in Python, below you can find a sample url and the code, what i want to do is splitting the (74743) from the url and make a for loop which will be taking it from a parts list. Tried to use u...Learn More
  7. Splitting binary file content in two parts using single byte separator in python

    I have a file consisting in three parts: Xml header (unicode); ASCII character 29 (group separator); A numeric stream to the end of file I want to get one xml string from the first part, and the numeric str...Learn More
  8. split string and insert break line

    I have a string of say 2000 characters how can I split the screen into 70 characters and insert newline for each 70 lines I have tried for first 70 characters and works fine as follow : Dim notes As String = ""...Learn More
  9. How can I split a string of a float number into two parts?

    I have the string '1234.12'. I want to split the string into two lists [1234] [12] The only way I know is to make the whole string into a list by using .split(). Or use a comprehension [ n.split() for n in '123...Learn More
  10. Remove characters before and including _ in python 2.7

    The following code returns into a nice readable output. def add_line_remove_special(ta_from,endstatus,*args,**kwargs): try: ta_to = ta_from.copyta(status=endstatus) infile = botslib.opendata...Learn More
  11. Splitting a string with multiple separators

    I have a string which contains coordinates of chess pieces: pieces = [Ka4Qb3Td7b4c4] How can i split the string into a list, separated by the numbers? Wanted output : ['Ka4', 'Qb3', 'Td7', 'b4', 'c4']...Learn More
  12. AttributeError: 'list' object has no attribute 'split' when i try to split a row from csv file

    I have a csv file with 10 rows of text in one column. For each row, i would like to remove the stopwords and get back the same csv file just minus the stopwords. This is my code: def remove_stopwords(filename):...Learn More