Note
Click here to download the full example code
Link Pandas and OpenTURNSΒΆ
# sphinx_gallery_thumbnail_path = '_static/pandas.png'
In this example we are going to explore interaction with Pandas data analysis tool.
from __future__ import print_function
import openturns as ot
import pandas as pd
ot.Log.Show(ot.Log.NONE)
Create a sample from a 3-d normal distribution
sample = ot.Normal(3).getSample(10)
Create a DataFrame from a Sample
df = pd.DataFrame.from_records(sample, columns=sample.getDescription())
df.describe()
Create a Sample from a DataFrame
sample2 = ot.Sample(df.values)
sample2.setDescription(df.columns)
sample2
Total running time of the script: ( 0 minutes 0.223 seconds)