haneulkim
haneulkim

Reputation: 4928

Change value in string to integer in pandas

In total of 8 columns I want to start from 3rd one and convert them to integer type. They are values buy in strings. ex: "1436", "12", etc.

Upvotes: 0

Views: 263

Answers (1)

BENY
BENY

Reputation: 323376

Check with

df.iloc[:,3:].replace({',': ''},regex=True).astype(int)

Upvotes: 1

Related Questions