I'm trying to clean up a column in my data frame that has the count next to size (ex: 12X350). I'm trying to only get the right side of the X which is the size. But having some issues.
import pandas as pd
data = [['product1', '13X255'], ['product2', "2"], ['product3', "500"]]
df = pd.DataFrame(data, columns = ['Product', 'Size'])
df
Product Size
0 product1 13X255
1 product2 2
2 product3 500
Using this string split with regex gets at what I need but fills in values with
df['Size'].str.split(r'[A-Z]', n =1, expand = True)
0 1
0 13 255
1 2 None
2 500 None
Desired output that I would like to have:
Product Size
0 product1 255
1 product2 2
2 product3 500
Any help would be greatly appreciated. Thanks!