A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
| def next_digit(value, base): | |
| return value + str(sum(int(a)*b for a,b in zip(value, base))%11%10) | |
| def make_valid(value, ap2, base): | |
| return next_digit(next_digit(value, base), ap2+base) | |
| def is_valid_cpf(cpf): | |
| return make_valid(cpf[:9], [0], [1,2,3,4,5,6,7,8,9]) == cpf | |
| def is_valid_cnpj(cnpj): |
| '''From Coding Train | |
| https://youtu.be/BAejnwN4Ccw | |
| 3/2/2017 | |
| Added Genetic Algorithm | |
| 4/27/2017 | |
| ''' | |
| import random | |
| cities = []; |
| import pandas as pd | |
| import pandas_datareader.data as web | |
| import numpy as np | |
| import datetime | |
| from scipy.optimize import minimize | |
| TOLERANCE = 1e-10 | |
| def _allocation_risk(weights, covariances): |
Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
Olá <NOME_EMPRESA>.
Vocês estão me enviando <email, ligação, SMS, via plataforma Whatsapp, via plataforma Telegram> comerciais não-solicitados, portanto SPAM.
No dia vocês enviaram ao meu uma mensagem comércial, com o seguinte texto:
<MENSAGEM>
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
name: tufte-viz description: | Ideate and critique data visualizations using Edward Tufte's principles from "The Visual Display of Quantitative Information." Use this skill when: (1) Designing new data visualizations or charts (2) Critiquing or improving existing visualizations (3) Reviewing dashboards or reports for graphical integrity (4) Deciding between visualization approaches (5) Reducing chartjunk or improving data-ink ratio (6) Planning small multiples or high-density displays