In [3]:
import pandas as pd;
In [7]:
df = pd.read_csv("./data/ZILL-Z77006_MLP.csv");
print(df.head());
In [8]:
df.set_index("Date", inplace=True);
print(df.head());
df.to_csv("./data/z77006_mlp_new.csv");
In [18]:
df = pd.read_csv("./data/z77006_mlp_new.csv", index_col=0);
df.columns = ["Austin_HPI"];
print(df.head());
df.to_csv("./data/z77006_mlp_no_header.csv", header=False);
In [22]:
df = pd.read_csv("./data/z77006_mlp_no_header.csv", names=["Date", "Austin_HPI"])
print(df.head());
In [29]:
df = pd.read_csv("./data/z77006_mlp_no_header.csv", names=["Date", "Austin_HPI"], index_col=0)
print(df.head());
In [30]:
df.to_html("./data/z77006_mlp_no_header.html"); #to html <table>
In [33]:
df.rename(columns={"Austin_HPI":"77006_HPI"}, inplace=True); # Have you thinked that this should be a function?
print(df.head());
In [ ]: