Issue
I was trying to using !date
to print date-related information in jupyter notebook, but it seems that it just hang around there without running, what might be reason. I am using Anaconda virtual environment on windows.
Solution
In IPython syntax, the exclamation mark (!) allows users to run shell commands from inside a Jupyter Notebook code cell.
If you are on Windows, date will show the system data and allows you to set a new one. This doesn't make much sense from inside Jupyter Notebooks.
If you want to see the current date and time in IPython, instead use
import time
time.strftime("%c")
Answered By - Peter
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.