-- General Syntax
CREATE VIEW view_name AS
<SELECT QUERY>
CREATE OR REPLACE VIEW view_name AS
SELECT * | |
FROM table_A | |
FULL OUTER JOIN table_B | |
ON table_A.col = table_B.col | |
WHERE table_A.col IS null | |
OR table_B.col IS null |
tokens = nltk.word_tokenize(text.lower()) | |
text = nltk.Text(tokens) | |
tags = nltk.pos_tag(text) |
handles_0, labels_0 = axes[0].get_legend_handles_labels() | |
handles_1, labels_1 = axes[1].get_legend_handles_labels() | |
handels = handles_0 + handles_1 | |
labels = labels_0 + labels_1 | |
fig.legend(handels, labels, loc=(0.83, 0.85)) | |
"""Here, the main function is `.get_legend_handles_labels()` | |
it will return the labels and handles for individual plots |
from sklearn import set_config | |
set_config(display='diagram') | |
pipeline |
def new_ft(operation): | |
ft = {} | |
for i in range(len(num_features)): | |
for j in range(i+1, len(num_features)): | |
ft1 = num_features[i] | |
ft2 = num_features[j] | |
oparated = eval(f"combined_xy[ft1] {operation} combined_xy[ft2]") | |
corr = oparated.corr(combined_xy["co2"]) | |
ft[f"{ft1} {operation} {ft2}"] = corr | |
ser = pd.Series(ft) |
# For most plots | |
plt.legend([], [], frameon=False); | |
# For pairplot | |
temp = sns.pairplot(...) | |
temp._legend.remove() |
plt.figure(figsize=(10, 6)) | |
corr = df.corr() | |
mask = np.zeros_like(corr) | |
mask[np.triu_indices_from(mask)] = True | |
sns.heatmap(corr, mask=mask, square=True, cmap="Blues") |