Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dataframe Removes Zeros
#1
Hello all;

I am importing an excel sheet into python as a dataframe using the code:-

Report = pandas.read_excel(Crack_Report, sheet_name="Current", usecols=("A:BA"), skiprows=(4))
In this excel sheet i have a set of columns with the following values:-
Column (A) Column (B)
043.0550 043.0550
049.1100 049.1100

However after importing the data, python shows these values in the dataframe as:-
43.055 43.055
49.11 49.11

It strips away the leading 0 which is fine but it also removes all of the zeros after the decimal point.

Can anyone tell me how i can overcome this?

Thank you.
Reply


Messages In This Thread
Dataframe Removes Zeros - by JoeDainton123 - Sep-16-2020, 07:03 PM
RE: Dataframe Removes Zeros - by bowlofred - Sep-16-2020, 07:31 PM
RE: Dataframe Removes Zeros - by scidam - Sep-17-2020, 12:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  -i option changes sys.path (removes leading empty string '') markanth 6 3,700 Aug-26-2022, 09:27 PM
Last Post: markanth
  remove zeros at the end of a number Frankduc 7 4,606 Feb-25-2022, 03:48 PM
Last Post: Frankduc
  The code I have written removes the desired number of rows, but wrong rows Jdesi1983 0 2,236 Dec-08-2021, 04:42 AM
Last Post: Jdesi1983
  Solving for zeros of an equation! fmitchell17 0 2,430 Apr-05-2021, 07:49 PM
Last Post: fmitchell17
  How to keep leading zeros with pandas? eeps24 1 8,910 May-20-2020, 07:51 PM
Last Post: deanhystad
  Why does pop() removes an element from more than one list? albufork 5 4,077 Nov-17-2019, 08:01 AM
Last Post: buran
  Probs with leading zeros falling away :-) Badosc 2 3,649 Dec-04-2018, 08:57 PM
Last Post: Badosc
  Controlling trailing zeros with rounding? RedSkeleton007 1 28,052 Jan-25-2018, 07:23 AM
Last Post: j.crater
  leading zeros kerzol81 7 8,911 Apr-23-2017, 03:53 PM
Last Post: kerzol81
  program is related to leading zeros amrita 3 4,960 Apr-13-2017, 06:57 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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