Skip to content

Instantly share code, notes, and snippets.

@pedrolugo2
pedrolugo2 / pandas.code-snippets
Last active August 17, 2020 15:58
VS Code Snippets File with lots of pandas useful pieces of code
"pd_to_numeric": {
"scope": "python",
"description": "Convert Series datatype to numeric (will error if column has non-numeric values) ",
"prefix": "pd_to_numeric",
"body": [
"pd.to_numeric(df['Column Name'])"
],
},
"pd_to_numeric_nan": {
"scope": "python",
@pedrolugo2
pedrolugo2 / useful_pandas_snippets.md
Created August 12, 2020 13:07 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)