Multiplication of column doesn't work as expected pandas
Solution 1:
You forgot to convert to int:
date = data['Date'].str[6:7].astype(int)
Output:
date = data['Date'].str[6:7].astype(int)
stock = data['Total Stock Owned']
data['Incremenet of stock based on month'] = date * stock
print(data)
Total Stock Owned Date Incremenet of stock based on month
0 5 1989-02-10 03:45:29 10
1 3 2003-06-17 06:46:02 18
2 8 1982-01-23 12:32:18 8
3 8 2016-04-06 07:29:44 32
4 8 2010-05-29 09:43:25 40
5 8 1982-08-20 11:33:26 64
6 3 1994-04-16 16:21:16 12
7 9 1985-02-21 13:29:34 18
8 8 2005-04-10 03:13:01 32
9 2 1998-03-23 22:31:06 6