Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read a csv and plot in python

# Imports
import numpy as np
import pandas as pd
from pandas import DataFrame, Series
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
from __future__ import division
import seaborn as sns
sns.set(style='ticks', palette='Set2')
%matplotlib inline

#GG
df= pd.read_csv('/content/drive/MyDrive/Colab Notebooks/res_data/dimers/py_GG.dat', header = None, delim_whitespace=True, error_bad_lines=False)

import seaborn as sns
sns.set_theme(style="ticks")

ax = df
print(df.head)
sns.pairplot(ax, hue=0, height=20, plot_kws={"s": 20})
 
PREVIOUS NEXT
Tagged: #read #csv #plot #python
ADD COMMENT
Topic
Name
9+2 =