Re: How do I get the integer of a decimal string?

2013-02-09 Thread frocco
Thank you

On Saturday, February 9, 2013 12:32:38 PM UTC-5, Brad Pitcher wrote:
>
> Convert it to float first: 
> int(float("14.00")) 
>
> On Sat, 2013-02-09 at 09:27 -0800, frocco wrote: 
> > Hello, 
> > 
> > 
> > I am reading a cdv file and one col has the value of "14.00" 
> > I want to get the integer value if 14 
> > I tried int("14.00") 
> > 
> > 
> > Thanks in advance 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to django-users...@googlegroups.com . 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/django-users?hl=en. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How do I get the integer of a decimal string?

2013-02-09 Thread Brad
Convert it to float first:
int(float("14.00"))

On Sat, 2013-02-09 at 09:27 -0800, frocco wrote:
> Hello,
> 
> 
> I am reading a cdv file and one col has the value of "14.00"
> I want to get the integer value if 14
> I tried int("14.00")
> 
> 
> Thanks in advance
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




How do I get the integer of a decimal string?

2013-02-09 Thread frocco
Hello,

I am reading a cdv file and one col has the value of "14.00"
I want to get the integer value if 14
I tried int("14.00")

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.