Blog
How to Download and Plot Stock Prices with quantmod in R
R provides several powerful tools for financial market analysis. This tutorial will go through how to download and plot the daily stock prices from Yahoo! Finance using quantmod. Yahoo finance provides free access to historic stock prices at the time of writing this...
How to do Matrix Multiplication in R
To perform element-by-element multiplication between two matrices X and Y, you must use the * operator as follows: X * Y If you want to perform matrix multiplication between two matrices X and Y, you must use the %*% operator as follows: X * Y This tutorial will go...
What is the Difference Between iter, into_iter and iter_mut in Rust?
In Rust iter() returns an iterator of slices, into_iter() returns an iterator from a value, and iter_mut() returns an iterator that allows modifying each value. This tutorial will detail the Iterator and IntoIterator traits and the differences between the three...
How to Solve Python AttributeError: module ‘datetime’ has no attribute ‘utcnow’
This error occurs when you import the datetime module and try to call the utcnow() method on the imported module. You can solve this error by importing the datetime class using: from datetime import datetime or accessing the class method using:...
How to Solve Python AttributeError: module ‘datetime’ has no attribute ‘today’
This error occurs when you import the datetime module and try to call the today() method on the imported module. You can solve this error by importing the datetime class using: from datetime import datetime or accessing the class method using:...
How to Solve Python AttributeError: type object ‘datetime.datetime’ has no attribute ‘fromisoformat’
This error occurs when you try to use datetime.fromisoformat with a Python version 3.6 or older. The datetime.fromisoformat method is not present in Python version 3.6 and older. You can solve this error by upgrading your Python version to 3.7 or newer. Alternatively,...
How to Solve Python AttributeError: ‘datetime.datetime’ object has no attribute ‘timedelta’
This error occurs when you import the datetime class from the datetime module using from datetime import datetime and then try to call the timedelta method like datetime.timedelta(). You can solve this error by removing the extra datetime when calling timedelta() or...
How to Solve Python AttributeError: module ‘datetime’ has no attribute ‘strftime’
This error occurs when you import the datetime module and try to call the strftime() method on the imported module. You can solve this error by importing the datetime class using: from datetime import datetime or accessing the class method using...
How to Solve Python AttributeError: module ‘datetime’ has no attribute ‘strptime’
This error occurs when you import the datetime module and try to call the strptime() method on the imported module. You can solve this error by importing the datetime class using from datetime import datetime or accessing the class method using...
How to Solve Python AttributeError: module ‘datetime’ has no attribute ‘now’
This error occurs when you import the datetime module and try to call the now() method on the imported module. You can solve this error by importing the datetime class using from datetime import datetime or access the class method using datetime.datetime.now() This...
Suf is a senior advisor in data science with deep expertise in Natural Language Processing, Complex Networks, and Anomaly Detection. Formerly a postdoctoral research fellow, he applied advanced physics techniques to tackle real-world, data-heavy industry challenges. Before that, he was a particle physicist at the ATLAS Experiment of the Large Hadron Collider. Now, he’s focused on bringing more fun and curiosity to the world of science and research online.