Python Forum
remove b due to conversion in PyQ
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
remove b due to conversion in PyQ
#1
Hi Team,

Am trying to get rid of the b that appears in the column?

Data type of my output:
df.info()
Output:
Date: Dtype: object Col 2: Dtype: object Col 3: Dtype: object Col 4: Dtype: int16
I want to remove [b''] from output:

[b'yxyz'] from Col 2 - 4, tried below

df.replace('b', '')
df.replace(r'[^a-z]','',regex=True)
Still no luck....can you help me?
Yoriz write Jul-15-2021, 08:24 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
remove b due to conversion in PyQ - by Creepy - Jul-15-2021, 08:14 PM
RE: remove b due to conversion in PyQ - by Creepy - Jul-16-2021, 04:57 PM
RE: remove b due to conversion in PyQ - by Creepy - Jul-16-2021, 07:19 PM
RE: remove b due to conversion in PyQ - by Creepy - Jul-20-2021, 06:54 PM
RE: remove b due to conversion in PyQ - by Creepy - Jul-21-2021, 05:57 PM

Forum Jump:

User Panel Messages

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