I'm complete newby to any kind of these programs.
I studied philosophy and economy and trying to learn python for web crawler for my own investment strategy.
I'm from South Korea, so I'm quite nervous to type English here, but I'm trying to be brave! (please, excuse my ugly English)
this is the DataFrame that I've got from the website.
I'm crawling financial datas and as you might see, numbers has commas in it.
their types are object
.
what I want to do is to make them integer so I can do some math.(sum, multiplication, etc.)
I searched (including Korean web sites) and I found the way to do using columns name, like this code
cols = ['col1', 'col2', ..., 'colN']
df[cols] = df[cols].replace({'\$': '', ',': ''}, regex=True)
But, what I need is doing it regardless columns' name
I need over 2000 companies' data and columns' names are different depending on company
I'd like to make a code like
"Delete ',' in cols, cols from col#0 to col#end"
Thanks in advance