0

I'm trying to split the lines of a column in the CSV file, then I want to speed up the process I'm going to do with the help of thread, but I don't know how to do the splitting.



import csv
import pandas as pd
import threading


df = pd.read_csv("clearData.csv")
a = df["Product"].head(50)

def halfSplit():
    for i in a:
        for k in a:
            result = simTest(i,k)
            print(result,i,k)
 
 
def otherHalfSplit():
    for i in a:
        for k in a:
            result = simTest(i,k)
            print(result,i,k)
 
 
if __name__ =="__main__":

    t1 = threading.Thread(target=halfSplit, args=(10,))
    t2 = threading.Thread(target=otherHalfSplit, args=(10,))
    t1.start()
    t2.start()
    t1.join()
    t2.join()

berkaymn
  • 3
  • 2
  • the question doesn't seem to be related to CSV or multithreading, it's a shorthand for [How to split a dataframe string column into two columns?](https://stackoverflow.com/questions/14745022/how-to-split-a-dataframe-string-column-into-two-columns) – Ahmed AEK Nov 19 '22 at 13:34

0 Answers0