draw data in graph using random forest python [on hold]
How to draw this pandas dataframe in graph using random forest this is the code bellow and the output of pandas dataset:
carriersID = [1, 2, 3, 5, 6, 7, 8, 9]
destinationId = [2, 5, 4, 4, 5, 7, 8, 7]
departureDate = [1, 2, 3, 4, 5, 7, 8]
prices = [755, 800, 500, 400, 152, 444, 784, 954, 120]
df = pd.DataFrame([carriersID, destinationId, departureDate, prices]).T
df.columns = ['carriersID', 'destinationId', 'departureDate', 'prices']
print(df)
+---+-------------+---------------+---------------+--------+
| | carriersID | destinationId | departureDate | prices |
+---+-------------+---------------+---------------+--------+
| 0 | 1.0 | 2.0 | 1.0 | 755.0 |
| 1 | 2.0 | 5.0 | 2.0 | 800.0 |
| 2 | 3.0 | 4.0 | 3.0 | 500.0 |
| 3 | 5.0 | 4.0 | 4.0 | 400.0 |
| 4 | 6.0 | 5.0 | 5.0 | 152.0 |
| 5 | 7.0 | 7.0 | 7.0 | 444.0 |
| 6 | 8.0 | 8.0 | 8.0 | 784.0 |
| 7 | 9.0 | 7.0 | NaN | 954.0 |
| 8 | NaN | NaN | NaN | 120.0 |
+---+-------------+---------------+---------------+--------+
python pandas matplotlib graph
put on hold as unclear what you're asking by desertnaut, Scott Boston, meowgoesthedog, gnat, leftjoin 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
How to draw this pandas dataframe in graph using random forest this is the code bellow and the output of pandas dataset:
carriersID = [1, 2, 3, 5, 6, 7, 8, 9]
destinationId = [2, 5, 4, 4, 5, 7, 8, 7]
departureDate = [1, 2, 3, 4, 5, 7, 8]
prices = [755, 800, 500, 400, 152, 444, 784, 954, 120]
df = pd.DataFrame([carriersID, destinationId, departureDate, prices]).T
df.columns = ['carriersID', 'destinationId', 'departureDate', 'prices']
print(df)
+---+-------------+---------------+---------------+--------+
| | carriersID | destinationId | departureDate | prices |
+---+-------------+---------------+---------------+--------+
| 0 | 1.0 | 2.0 | 1.0 | 755.0 |
| 1 | 2.0 | 5.0 | 2.0 | 800.0 |
| 2 | 3.0 | 4.0 | 3.0 | 500.0 |
| 3 | 5.0 | 4.0 | 4.0 | 400.0 |
| 4 | 6.0 | 5.0 | 5.0 | 152.0 |
| 5 | 7.0 | 7.0 | 7.0 | 444.0 |
| 6 | 8.0 | 8.0 | 8.0 | 784.0 |
| 7 | 9.0 | 7.0 | NaN | 954.0 |
| 8 | NaN | NaN | NaN | 120.0 |
+---+-------------+---------------+---------------+--------+
python pandas matplotlib graph
put on hold as unclear what you're asking by desertnaut, Scott Boston, meowgoesthedog, gnat, leftjoin 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
i want plot data on graph
– user 123548
2 days ago
2
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago
add a comment |
How to draw this pandas dataframe in graph using random forest this is the code bellow and the output of pandas dataset:
carriersID = [1, 2, 3, 5, 6, 7, 8, 9]
destinationId = [2, 5, 4, 4, 5, 7, 8, 7]
departureDate = [1, 2, 3, 4, 5, 7, 8]
prices = [755, 800, 500, 400, 152, 444, 784, 954, 120]
df = pd.DataFrame([carriersID, destinationId, departureDate, prices]).T
df.columns = ['carriersID', 'destinationId', 'departureDate', 'prices']
print(df)
+---+-------------+---------------+---------------+--------+
| | carriersID | destinationId | departureDate | prices |
+---+-------------+---------------+---------------+--------+
| 0 | 1.0 | 2.0 | 1.0 | 755.0 |
| 1 | 2.0 | 5.0 | 2.0 | 800.0 |
| 2 | 3.0 | 4.0 | 3.0 | 500.0 |
| 3 | 5.0 | 4.0 | 4.0 | 400.0 |
| 4 | 6.0 | 5.0 | 5.0 | 152.0 |
| 5 | 7.0 | 7.0 | 7.0 | 444.0 |
| 6 | 8.0 | 8.0 | 8.0 | 784.0 |
| 7 | 9.0 | 7.0 | NaN | 954.0 |
| 8 | NaN | NaN | NaN | 120.0 |
+---+-------------+---------------+---------------+--------+
python pandas matplotlib graph
How to draw this pandas dataframe in graph using random forest this is the code bellow and the output of pandas dataset:
carriersID = [1, 2, 3, 5, 6, 7, 8, 9]
destinationId = [2, 5, 4, 4, 5, 7, 8, 7]
departureDate = [1, 2, 3, 4, 5, 7, 8]
prices = [755, 800, 500, 400, 152, 444, 784, 954, 120]
df = pd.DataFrame([carriersID, destinationId, departureDate, prices]).T
df.columns = ['carriersID', 'destinationId', 'departureDate', 'prices']
print(df)
+---+-------------+---------------+---------------+--------+
| | carriersID | destinationId | departureDate | prices |
+---+-------------+---------------+---------------+--------+
| 0 | 1.0 | 2.0 | 1.0 | 755.0 |
| 1 | 2.0 | 5.0 | 2.0 | 800.0 |
| 2 | 3.0 | 4.0 | 3.0 | 500.0 |
| 3 | 5.0 | 4.0 | 4.0 | 400.0 |
| 4 | 6.0 | 5.0 | 5.0 | 152.0 |
| 5 | 7.0 | 7.0 | 7.0 | 444.0 |
| 6 | 8.0 | 8.0 | 8.0 | 784.0 |
| 7 | 9.0 | 7.0 | NaN | 954.0 |
| 8 | NaN | NaN | NaN | 120.0 |
+---+-------------+---------------+---------------+--------+
python pandas matplotlib graph
python pandas matplotlib graph
edited 2 days ago
Anna Iliukovich-Strakovskaia
768113
768113
asked 2 days ago
user 123548
13
13
put on hold as unclear what you're asking by desertnaut, Scott Boston, meowgoesthedog, gnat, leftjoin 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as unclear what you're asking by desertnaut, Scott Boston, meowgoesthedog, gnat, leftjoin 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
i want plot data on graph
– user 123548
2 days ago
2
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago
add a comment |
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
i want plot data on graph
– user 123548
2 days ago
2
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
i want plot data on graph
– user 123548
2 days ago
i want plot data on graph
– user 123548
2 days ago
2
2
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
Try df.plot()
with parameters. You can choose king of graph, figsize (and other parameters). I think it isn't good idea plot all you data example in one graph (because column have different scale and sense), but you can try something like this:
df.plot(kind='barh', figsize=(10,10))
i want to show all the column in data in one graph
– user 123548
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try df.plot()
with parameters. You can choose king of graph, figsize (and other parameters). I think it isn't good idea plot all you data example in one graph (because column have different scale and sense), but you can try something like this:
df.plot(kind='barh', figsize=(10,10))
i want to show all the column in data in one graph
– user 123548
2 days ago
add a comment |
Try df.plot()
with parameters. You can choose king of graph, figsize (and other parameters). I think it isn't good idea plot all you data example in one graph (because column have different scale and sense), but you can try something like this:
df.plot(kind='barh', figsize=(10,10))
i want to show all the column in data in one graph
– user 123548
2 days ago
add a comment |
Try df.plot()
with parameters. You can choose king of graph, figsize (and other parameters). I think it isn't good idea plot all you data example in one graph (because column have different scale and sense), but you can try something like this:
df.plot(kind='barh', figsize=(10,10))
Try df.plot()
with parameters. You can choose king of graph, figsize (and other parameters). I think it isn't good idea plot all you data example in one graph (because column have different scale and sense), but you can try something like this:
df.plot(kind='barh', figsize=(10,10))
edited 2 days ago
answered 2 days ago
Anna Iliukovich-Strakovskaia
768113
768113
i want to show all the column in data in one graph
– user 123548
2 days ago
add a comment |
i want to show all the column in data in one graph
– user 123548
2 days ago
i want to show all the column in data in one graph
– user 123548
2 days ago
i want to show all the column in data in one graph
– user 123548
2 days ago
add a comment |
You want to draw data or model graph? If you want to plot data graph, I think you could find other libraries for that.
– Anna Iliukovich-Strakovskaia
2 days ago
i want plot data on graph
– user 123548
2 days ago
2
Your question is quite unclear; Random Forest has nothing to do with plotting...
– desertnaut
2 days ago