Python Forum
Confusion in exact term used for ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusion in exact term used for ?
#1
import pandas as pd
diSales= { 2016:{'qtr1':34500,'qtr2':56000,'qtr3':47000,'qtr4':49000},
           2017:{'qtr1':44900,'qtr2':46100,'qtr3':57000,'qtr4':59000},
           2018:{'qtr1':54500,'qtr2':51000,'qtr3':57000,'qtr4':58500},
           2019:{'qtr1':61000}
         }
df = pd.DataFrame(diSales)
ks = df.count()
print(ks)
in above example i am using name df, ks but what exact term i will use for that: variable or object ?

are df and ks variables or anything ? plz clarify me
Reply
#2
Technically its both because everything in python is an object and that a variable. But i would call it a DataFram object because its a pandas.core.frame.Dataframe class' object.
Recommended Tutorials:
Reply
#3
Strictly technically the term is name. Names point to objects (everything in python is object). But even the python documentation use sometime the term variable when refer to names. So if you use variable it would be understood what you mean.
See also
https://docs.python.org/3/reference/exec...nd-binding
https://nedbatchelder.com/text/names.html
https://stackoverflow.com/a/20700681/4046632
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question in this code, I input Key_word, it can not find although all data was exact Help me! duchien04x4 3 971 Aug-31-2023, 05:36 PM
Last Post: deanhystad
  The term 'pip' is not recognized as the name of a cmdlet, function michaelnicol 1 597 Jul-16-2023, 11:12 PM
Last Post: deanhystad
  Sum of changing general term Vantin19 2 681 Apr-04-2023, 08:22 AM
Last Post: Gribouillis
  matrix multiplication term by term karolina 1 801 Dec-10-2022, 10:11 AM
Last Post: Gribouillis
  Matching Exact String(s) Extra 4 1,859 Jan-12-2022, 04:06 PM
Last Post: Extra
  Long-term stable source to get news headlines with Python? sandufi 4 1,861 Dec-23-2021, 09:48 AM
Last Post: sandufi
  replace exact word marfer 1 6,009 Oct-11-2021, 07:08 PM
Last Post: snippsat
  Assistance with running a few lines of code at an EXACT time nethatar 5 3,165 Feb-24-2021, 10:43 PM
Last Post: nilamo
  Exact Match Kristenl2784 2 2,750 Jul-26-2020, 03:29 PM
Last Post: Kristenl2784
  Two exact "Fors" giving me different results? FilGonca 2 1,956 May-04-2020, 12:36 PM
Last Post: FilGonca

Forum Jump:

User Panel Messages

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