Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: how to combine rows to a column base on ids
Post: how to combine rows to a column base on ids

I have a dataframe: df = pd.DataFrame({'id': [1,1,1,1,2,2,2,3,3,3,3,3], 'cost': [3,4,5,6,7,8,9,11,15,10,9,7], 'amount': [23,34,45,26,27,38,39,611,615,610,89,79] ...
zhujp98 General Coding Help 0 1,493 Nov-03-2020, 04:10 PM
    Thread: How to change a dataframe column to lower case
Post: RE: How to change a dataframe column to lower case

thanks!
zhujp98 General Coding Help 5 6,296 Oct-29-2019, 06:42 PM
    Thread: How to change a dataframe column to lower case
Post: RE: How to change a dataframe column to lower case

Thanks, I want to use program to do that. The short code is just a simple example. I actually have a very large table with 50 columns. The dataframe is created from a .csv file. I want to change one ...
zhujp98 General Coding Help 5 6,296 Oct-29-2019, 04:11 PM
    Thread: How to change a dataframe column to lower case
Post: How to change a dataframe column to lower case

# Import pandas library import pandas as pd # initialize list of lists data = [['tom', 10], ['nick', 15], ['juli', 14]] # Create the pandas DataFrame df = pd.DataFrame(data, columns = ['Nam...
zhujp98 General Coding Help 5 6,296 Oct-29-2019, 03:42 PM
    Thread: how to use dataframe in dash?
Post: how to use dataframe in dash?

I am very new to python, need to develop some dash, I have a padas dataframe. df: x y1 y2 1 4 2 2 1 4 3 5 5 My question is how to use df to replace the hard coded 'data' part in followi...
zhujp98 General Coding Help 1 2,840 Jun-19-2018, 12:51 PM
    Thread: dash problems
Post: dash problems

I want to scatter plot campcnt vs cnt by year, but I get error msg. How to fix this problem? Thanks, Jeff print(df.head()) app = dash.Dash() app.layout = html.Div([ dcc.Graph( id='life-e...
zhujp98 General Coding Help 0 2,240 Jun-14-2018, 03:30 PM
    Thread: code question
Post: code question

I run following code, why df.head() did not print the top record of df? Thanks, Jeff import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd import plotl...
zhujp98 Data Science 1 2,049 Jun-13-2018, 07:52 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020