1

I am trying to write dataframe into csv file using !cat but I'm getting some errors.

Code:

data.to_csv(r'C:\Users\Downloads\pydata\pydata-book-2nd-edition\examples\out.csv')
!cat C:\Users\Pruthvish\Downloads\pydata\pydata-book-2nd-edition\examples\out.csv
,something,a,b,c,d,message
0,one,1,2,3.0,4
1,two,5,6,,8,world
2,three,9,10,11.0,12,foo

Error:

'cat' is not recognized as an internal or external command, operable program or batch file.
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-194-9f4495d324cb> in <module>()
      1 get_ipython().system('cat C:\\Users\\Downloads\\pydata\\pydata-book-2nd-edition\\examples\\out.csv')
----> 2 something(",a,b,c,d,message")
      3 0,one,1,2,3.0,4
      4 1,two,5,6,,8,world
      5 2,three,9,10,11.0,12,foo

NameError: name 'something' is not defined

I even tried !type and !more but name error is still there. How can I fix this error?

Pruthvish
  • 21
  • 3
  • 1
    Welcome to SO. Please provide a [mcve]. In this case, you can [edit](https://stackoverflow.com/posts/50181071/edit) your question with the exact code you are running, including it as text, not as a link or an image. – jpp May 04 '18 at 18:26

0 Answers0