---
title: "Comment by Webster Alex T on \"How to Predict Stock Market Trends with Python and Machine Learning\" | Hashnode"
description: "Hi. I’m new at this. Having a difficulty I’m unable to resolve. This line Model.fit(x_train, y_train) Produces this error ValueError: Expected a 2 dimensional c"
url: "https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462/comment/66e53246734c399d666aeb84"
---

[Discussion](https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462)

Comment [How to Predict Stock Market Trends with Python and Machine Learning](https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462)

[Webster Alex T](https://hashnode.com/@Alex0116)

[Sep 14, 2024](https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462/comment/66e53246734c399d666aeb84)

Hi. I’m new at this. Having a difficulty I’m unable to resolve. This line

Model.fit(x\_train, y\_train)

Produces this error ValueError: Expected a 2 dimensional container but got ‘’ instead. Pass a DataFrame containing a single row(I.e. single sample) or a single column( I.e. single feature) instead.

Help is much appreciated. Thanks, Alex.

[ByteScrum Technologies](https://hashnode.com/@bytescrum)

[Sep 16, 2024](https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462/comment/66e53246734c399d666aeb84#reply-66e7b9a189124f749a23d478)

Hi, I have added the full code in the blog, can you check ?

[Melco Subrantas](https://hashnode.com/@Cair123456)

[Sep 20, 2024](https://hashnode.com/posts/how-to-predict-stock-market-trends-with-python-and-machine-learning/66da912cda3a23d764e93462/comment/66e53246734c399d666aeb84#reply-66ecbc5356193a8b8ba2ea63)

Saya juga mengalami kesulitan dalam login
