This is requirement for being a good mechanical engineer. You need to be familiar with different CS concepts such as data structures (stack, line, tree, graph), algorithms (search, filtering, dynamic and greedy programs), complex space and time, etc. The good thing is that you probably know all of this when you do your bachelor’s degree in computer science!
You should be familiar with different programming languages such as Python and R for ML and statistics, Spark and Hadoop computer distribution, SQL data management, Apache Kafka data processing, etc. Learning Science and Data so it is good to be familiar with libraries.