I'm new with Pandas and I'm trying to use it to clean a database that is composed of index, artwork title, and artwork dimension.
What I have is:
db1 = {'title' : ['121 art1 magic world 100x82 2000.jpg', '383 art2 fantastic comic 61x61 2017.jpg']}
What I need is
db2 = {'index': [121,383],
'title' : ['art1 magic world', 'art2 fantastic comic'],
'dimension': ['100x82','61x61']
'year': [2000, 2017]
What I've unsuccessfully tried:
str.split(expand=True)method, ondf = pd.DataFrame(dict)but I get stuck on the fact that the title is composed of numerous words..replace()method to cleandf['title']but I'm sure that that there is a best practice.
Could you please help? Thanks in advance.