Bottom Page

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
Quote
#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.
Quote
#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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  output confusion in sort_values of Pandas ift38375 1 133 Jun-14-2019, 05:10 PM
Last Post: ThomasL
  Confusion with sublcassing a threading class, and inheritance bigmit37 2 269 Apr-08-2019, 09:28 AM
Last Post: DeaD_EyE
  Finding exact phrase in list graham23s 2 224 Mar-13-2019, 06:47 PM
Last Post: graham23s
  readshapefile function in basemap - confusion regarding arguments sendiptangshu 1 260 Mar-09-2019, 09:29 AM
Last Post: Larz60+
  Appending inside elements of lists, in an exact location nhan826 1 377 Oct-23-2018, 01:17 AM
Last Post: micseydel
  Sockets confusion! MuntyScruntfundle 1 364 Oct-16-2018, 07:18 PM
Last Post: Larz60+
  Python and bash command confusion MuntyScruntfundle 0 446 Oct-11-2018, 04:52 PM
Last Post: MuntyScruntfundle
  Unable to print the exact Float values when I convert LIST to Sequence of Tuples? preethamalluri 1 524 Jul-12-2018, 09:03 AM
Last Post: buran
  Confusion about Hashlib Vysero 2 507 Jun-25-2018, 04:05 PM
Last Post: DeaD_EyE
  Object madness - JSON Notation confusion execsys 4 839 May-03-2018, 08:56 AM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)