#!/usr/bin/env python
# coding: utf-8

# # New Data Files: $\pi^+ , \pi^-, \pi^0 $

# Creating the separate dataframes.

# In[1]:


import pandas as pd

df_plus = pd.read_csv("pi_plus.csv")


# In[27]:


df_plus


# In[3]:


df_minus = pd.read_csv("pi_minus.csv")


# In[4]:


df_minus


# In[5]:


df_zero = pd.read_csv("pi_zero.csv")


# In[6]:


df_zero


# ## Splitting a dataframe.

# In[28]:


df_plus_quarter = df_plus.sample(frac=0.5)
df_plus_quarter


# In[29]:


df_minus_quarter = df_minus.sample(frac=0.5)
df_minus_quarter


# In[30]:


df_zero_half = df_zero.sample(frac = 1)
df_zero_half


# ## Combining multiple dataframes.

# In[31]:


df_combo = [df_plus_quarter, df_minus_quarter, df_zero_half]
together = pd.concat(df_combo)
together


# ## Creating Testing and Training Data

# In[32]:


train = together.sample(frac=0.75)
test = together.sample(frac=0.25)

train.to_csv("train.csv")
test.to_csv("test.csv")


18fcaf307ad906463cee12370b30de966c2b46d0
<mask token>

<mask token>
df_plus
<mask token>
df_minus
<mask token>
df_zero
<mask token>
df_plus_quarter
<mask token>
df_minus_quarter
<mask token>
df_zero_half
<mask token>
together
<mask token>
train.to_csv('train.csv')
test.to_csv('test.csv')

<mask token>
df_plus = pd.read_csv('pi_plus.csv')
df_plus
df_minus = pd.read_csv('pi_minus.csv')
df_minus
df_zero = pd.read_csv('pi_zero.csv')
df_zero
df_plus_quarter = df_plus.sample(frac=0.5)
df_plus_quarter
df_minus_quarter = df_minus.sample(frac=0.5)
df_minus_quarter
df_zero_half = df_zero.sample(frac=1)
df_zero_half
df_combo = [df_plus_quarter, df_minus_quarter, df_zero_half]
together = pd.concat(df_combo)
together
train = together.sample(frac=0.75)
test = together.sample(frac=0.25)
train.to_csv('train.csv')
test.to_csv('test.csv')

import pandas as pd
df_plus = pd.read_csv('pi_plus.csv')
df_plus
df_minus = pd.read_csv('pi_minus.csv')
df_minus
df_zero = pd.read_csv('pi_zero.csv')
df_zero
df_plus_quarter = df_plus.sample(frac=0.5)
df_plus_quarter
df_minus_quarter = df_minus.sample(frac=0.5)
df_minus_quarter
df_zero_half = df_zero.sample(frac=1)
df_zero_half
df_combo = [df_plus_quarter, df_minus_quarter, df_zero_half]
together = pd.concat(df_combo)
together
train = together.sample(frac=0.75)
test = together.sample(frac=0.25)
train.to_csv('train.csv')
test.to_csv('test.csv')

#!/usr/bin/env python
# coding: utf-8

# # New Data Files: $\pi^+ , \pi^-, \pi^0 $

# Creating the separate dataframes.

# In[1]:


import pandas as pd

df_plus = pd.read_csv("pi_plus.csv")


# In[27]:


df_plus


# In[3]:


df_minus = pd.read_csv("pi_minus.csv")


# In[4]:


df_minus


# In[5]:


df_zero = pd.read_csv("pi_zero.csv")


# In[6]:


df_zero


# ## Splitting a dataframe.

# In[28]:


df_plus_quarter = df_plus.sample(frac=0.5)
df_plus_quarter


# In[29]:


df_minus_quarter = df_minus.sample(frac=0.5)
df_minus_quarter


# In[30]:


df_zero_half = df_zero.sample(frac = 1)
df_zero_half


# ## Combining multiple dataframes.

# In[31]:


df_combo = [df_plus_quarter, df_minus_quarter, df_zero_half]
together = pd.concat(df_combo)
together


# ## Creating Testing and Training Data

# In[32]:


train = together.sample(frac=0.75)
test = together.sample(frac=0.25)

train.to_csv("train.csv")
test.to_csv("test.csv")

