Skip to content

Instantly share code, notes, and snippets.

View tsengchan's full-sized avatar

tsengchan

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
import numpy as np
#df2 = pd.DataFrame()
#columns = ['A','B', 'C','D','E','F','G']
df1_K = pd.read_table('jasonproblem.txt', names=('A','B', 'C','D','E','F','G'))
df1_inexact = df1_K.dropna(subset=['G']) ### keep only G that's inexact solution ie noNAN
df1_exact = df1_K.loc[df1_K['G'].isna()] #only exact solution