I want to set the column index as the Date, but don't know what is being done wrong, the code and first part of the data set are down below.
Code:
from random import randint
import pandas_datareader.data as web
import pandas as pd
import datetime
import itertools as it
import numpy as np
import csv
start = datetime.datetime(1984, 9, 11)
end = datetime.datetime(2019, 4, 2)
df = pd.read_csv('C:Users\GrahamFam\Desktop\Data Archive\Daily3eve(Archive).txt')
df.columns = ['Date','B1','B2','B3']
df.set_index('Date')
print(df)
Pandas Data:
Date B1 B2 B3
0 4022019 7 2 7
1 4012019 3 8 9
2 3312019 5 6 5
3 3302019 9 4 6
4 3292019 4 6 2
5 3282019 1 1 1
6 3272019 0 6 9
7 3262019 9 1 1
8 3252019 9 9 1
9 3242019 3 6 6
I would also like to flip the data, so the old data is first, and new data is last.