This file should help you discover if you are set up for the tutorial.
Hit the knit button on bar above.
library(reticulate)
library(ggplot2)
library(readxl)
import os
import pandas as pd
# for PCA
from sklearn.decomposition.pca import PCA
# for plotting
import matplotlib.pyplot as plt
df <- data.frame(x = rnorm(50), y = rnorm(50), gp = rep(c("A","B"), each = 25))
# summarise
r.df.shape
## (50, 3)
r.df["x"].mean()
## 0.10808886649287824
r.df["y"].mean()
## 0.05453721228381914
type(r.df)
## <class 'pandas.core.frame.DataFrame'>
a = r.df.loc[r.df['gp'] == "A"]
b = r.df.loc[r.df['gp'] == "B"]
plt.figure()
plt.scatter(a['x'], b['y'], label = "A")
plt.scatter(b['x'], b['y'], label = "B")
plt.legend()
plt.show()