1

My question is theoretical. Let's suppose I have a pandas Data Frame in python and I want to check what are the operations which can be performed on it. For e.g. we can perform rename, sum, mean etc. on a pandas data frame. But is there any command which will give me the complete list of these kind of operations?

vaishali bisht
  • 201
  • 3
  • 11

3 Answers3

3

You can always use dir command and check all available functions :)

Example: enter image description here

Prayson W. Daniel
  • 14,191
  • 4
  • 51
  • 57
1

You can use the command dir to inspect your dataframe -

df = pd.DataFrame([[1, 2, 'a']], columns =['A', 'B', 'C'])
for d in dir(df)[:10]: print (d)

Output (first 10 lines) -

A
B
C
T
_AXIS_ALIASES
_AXIS_IALIASES
_AXIS_LEN
_AXIS_NAMES
_AXIS_NUMBERS
_AXIS_ORDERS

See more about dir here

Tom Ron
  • 5,906
  • 3
  • 22
  • 38
0

Well I think there isn't a command to list all available commands, but you can install a basic Python Extension to help you out.

If you are using VS Code or Atom just go to Extension Marketplace, there are bunch of them from you can choose.

enter image description here

Stefan
  • 375
  • 1
  • 9
  • 24