The nudging data assimilation algorithm is a powerful tool used to forecast phenomena of interest given incomplete and noisy observations. Machine learning is becoming increasingly popular in data assimilation given its ease of computation and forecasting ability. This work proposes a new approach to data assimilation via machine learning where Deep Neural Networks (DNNs) are being taught the nudging algorithm. The accuracy of the proposed DNN based algorithm is comparable to the nudging algorithm and it is confirmed by the Lorenz 63 and Lorenz 96 numerical examples. The key advantage of the proposed approach is the fact that, once trained, DNNs are cheap to evaluate in comparison to nudging where typically differential equations are needed to be solved. Standard exponential type approximation results are established for the Lorenz 63 model for both the continuous and discrete in time models. These results can be directly coupled with estimates for DNNs (whenever available), to derive the overall approximation error estimates of the proposed algorithm.