'Cleaning csv column into fixed frame

sorry if it the wrong place to ask

I have a csv file with 12k+ rows and 2 columns[date,string] one of the columns have strings in it that most of them have 1-3 template that goes like: ["name(changes every row),fixed string, number, fixed string, number] I want that every template will split into 3 columns [name, fixed_string_1 (with the number that follows it inside), fixed_string_2 (with the number that follows it inside)] and that every new row will have the same time stamp as the row it was separated from.

with what tool is it possible to do it in python ? (and macOS)



Solution 1:[1]

You can use the pandas library in python to clean your data easily. and pandas documentation for CSV operations can be found at https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html

PS. the question needs more clarification. If you can post a snippet of the csv file with various different types of rows in your CSV file then I can write a snippet of code that you can use.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Saqib Mubarak