pandas: to_numeric for multiple columns - Stack Overflow
stackoverflow.com › questions › 36814100You can use: print df.columns[5:] Index([u'2004', u'2005', u'2006', u'2007', u'2008', u'2009', u'2010', u'2011', u'2012', u'2013', u'2014'], dtype='object') for col in df.columns[5:]: df[col] = pd.to_numeric(df[col], errors='coerce') print df GeoName ComponentName IndustryId IndustryClassification \ 37926 Alabama Real GDP by state 9 213 37951 Alabama Real GDP by state 34 42 37932 Alabama Real ...
Python Data Analysis Library - pandas
https://pandas.pydata.orgpandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language. Install pandas now! Getting started Install pandas Getting started Documentation User guide API reference Contributing to pandas Release notes Community About pandas Ask a question Ecosystem
Pandas Tutorial - W3Schools
https://www.w3schools.com/python/pandas/default.aspPandas is a Python library. Pandas is used to analyze data. Learning by Reading We have created 14 tutorial pages for you to learn more about Pandas. Starting with a basic introduction and ends up with cleaning and plotting data: Basic Introduction Getting Started Pandas Series DataFrames Read CSV Read JSON Analyze Data Cleaning Data Clean Data