Skip to content

Subsequent geom_tile call is not zero indexed for x axis. #905

Answered by has2k1
joseph-jnl asked this question in Q&A
Discussion options

You must be logged in to vote

With the way you create the dataframe, df1["column"] is discrete (dtype=object) while df2["column"] is continuous (dtype=int).

print({k: str(v.dtype) for k, v in df1.items()})
print({k: str(v.dtype) for k, v in df2.items()})

# {'row': 'int64', 'column': 'object', 'value': 'int64'}
# {'row': 'int64', 'column': 'int64', 'value': 'int64'}

So if you do

df1["column"] = df1["column"].astype(int)

It should act as you expect.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@has2k1
Comment options

Answer selected by joseph-jnl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants