Hi All.
I'm trying to run some models on a dataset for college assignments and having a problem with the following commands. I'm typing them direct into the command line.
I'm trying to run some models on a dataset for college assignments and having a problem with the following commands. I'm typing them direct into the command line.
import pandas as pd import matplotlib.pyplot as plt df= pd.read_csv ('/home/Documents/crypto-markets.csv') df = pd.DataFrame([['bitcoin',BTC,Bitcoin,2013-04-28,1,135.3,135.98,132.1,134.21,0,1500520000,0.5438,3.88], ['bitcoin',BTC,Bitcoin,2013-04-29,1,134.44,147.49,134,144.54,0,1491160000,0.7813,13.49]], columns=['slug',symbol,name,date,ranknow,open,high,low,close,volume,market,close_ratio,spread])This is the error message
Error:>>> import pandas as pd
>>> df = pd.DataFrame([['bitcoin',BTC,Bitcoin,2013-04-28,1,135.3,135.98,132.1,134.21,0,1500520000,0.5438,3.88],
File "<stdin>", line 1
df = pd.DataFrame([['bitcoin',BTC,Bitcoin,2013-04-28,1,135.3,135.98,132.1,134.21,0,1500520000,0.5438,3.88],
^
SyntaxError: invalid token
>>> ['bitcoin',BTC,Bitcoin,2013-04-29,1,134.44,147.49,134,144.54,0,1491160000,0.7813,13.49]],
File "<stdin>", line 1
['bitcoin',BTC,Bitcoin,2013-04-29,1,134.44,147.49,134,144.54,0,1491160000,0.7813,13.49]],
^
IndentationError: unexpected indent
>>> #columns=['slug',symbol,name,date,ranknow,open,high,low,close,volume,market,closer,spread])
... columns=['slug',symbol,name,date,ranknow,open,high,low,close,volume,market,spread])
File "<stdin>", line 2
columns=['slug',symbol,name,date,ranknow,open,high,low,close,volume,market,spread])
^
IndentationError: unexpected indent
>>>