Browse Python Data Science Snippets
📊 Collection of Sublime Text snippets for data science and machine learning in Python (Imports, NumPy, Pandas, Matplotlib, Scikit-learn, Keras, PyTorch, etc)
Installs
- Total 2K
- Win 2K
- Mac 368
- Linux 467
| Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 |
Windows | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 3 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 3 | 0 | 0 | 1 | 2 | 2 | 1 | 0 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 2 | 3 | 2 |
Mac | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 |
Readme
- Source
- raw.​githubusercontent.​com
📊 Python Data Science Snippets
![License](/readmes/img/0de4ffaf257c591e83af6e8a3702d109d0c66bca.svg)
Python Data Science Snippets is a collection of Sublime Text snippets for data science and machine learning in Python.
💻 Installation
The easiest way to install Python Data Science Snippets is through Package Control. After it is enabled inside Sublime Text, open the command palette and find Package Control: Install Package and press ENTER
. Then, find Python Data Science Snippets in the list. Press ENTER
again, and this package is installed!
📈 Snippets
Imports
Import snippets start with i
followed by the package/module's import alias.
Trigger |
Description |
ikeras |
from tensorflow import keras |
inp |
import numpy as np |
ipd |
import pandas as pd |
iplt |
import matplotlib.pyplot as plt |
isklearn |
from sklearn.$1 import $2 |
isns |
import seaborn as sns |
itf |
import tensorflow as tf |
itorch |
import torch |
inn |
from torch import nn |
idl |
from torch.utils.data import DataLoader |
NumPy
Trigger |
Description |
arange |
np.arange |
array |
np.array |
linspace |
np.linspace |
logspace |
np.logspace |
ones |
np.ones |
zeros |
np.zeros |
Pandas
Trigger |
Description |
apply |
df.apply |
columns |
df.columns |
describe |
df.describe |
df |
pd.DataFrame |
dropna |
df.dropna |
fillna |
df.fillna |
groupby |
df.groupby |
head |
df.head |
read_csv |
pd.read_csv |
rename |
df.rename |
reset_index |
df.reset_index |
sample |
df.sample |
ser |
pd.Series |
tail |
df.tail |
to_csv |
df.to_csv |
to_datetime |
pd.to_datetime |
Matplotlib
Trigger |
Description |
annotate |
plt.annotate |
bar_label |
plt.bar_label |
bar |
plt.bar |
barh |
plt.barh |
fill_between |
plt.fill_between |
hist |
plt.hist |
imread |
plt.imread |
imsave |
plt.imsave |
imshow |
plt.imshow |
legend |
plt.legend |
pie |
plt.pie |
plot |
plt.plot |
savefig |
plt.savefig |
scatter |
plt.scatter |
show |
plt.show |
stackplot |
plt.stackplot |
subplot |
plt.subplot |
subplots |
plt.subplots |
suptitle |
plt.suptitle |
text |
plt.text |
tight_layout |
plt.tight_layout |
title |
plt.title |
xlabel |
plt.xlabel |
xlim |
plt.xlim |
ylabel |
plt.ylabel |
ylim |
plt.ylim |
Scikit-learn
Trigger |
Description |
knn |
KNeighborsClassifier |
linreg |
LinearRegression |
logreg |
LogisticRegression |
rfc |
RandomForestClassifier |
tts |
train_test_split |
Keras
Trigger |
Description |
compile |
model.compile |
evaluate |
model.evaluate |
fit |
model.fit |
layer |
keras.layers.layer |
load_model |
keras.models.load_model |
predict |
model.predict |
save |
model.save |
sequential |
keras.Sequential |
PyTorch
Trigger |
Description |
dataloader |
torch.utils.data.DataLoader |
device |
torch.device (cuda/cpu) |
module |
torch.nn.Module |
The snippet files are in the snippets
folder of this GitHub repository.