Commands output#

Various PyMAPDL classes and commands which helps in data post-processing.

All these classes are subclasses of str class, hence they inherit all the methods and attributes of string.

class ansys.mapdl.core.commands.CommandListingOutput(content, cmd=None, magicwords=None, columns_names=None)#

Allow the conversion of command output to native Python types.

Custom class for handling the commands whose output is sensible to be converted to a list of lists, a Numpy array or a Pandas DataFrame.

This class is a subclass of python str, hence it has all the methods of a string python object.

Additionally it provides the following methods:

  • to_list()

  • to_array()

  • to_dataframe()

CommandListingOutput.to_list()

Export the command output a list or list of lists.

CommandListingOutput.to_array()

Export the command output as a numpy array.

CommandListingOutput.to_dataframe([data, ...])

Export the command output as a Pandas DataFrame.

class ansys.mapdl.core.commands.BoundaryConditionsListingOutput(content, cmd=None, magicwords=None, columns_names=None)#

Allow the conversion of command output to native Python types.

Custom class for handling the boundary condition listing commands whose output is sensible to be converted to a list of lists, or a Pandas DataFrame.

This class is a subclass of python str, hence it has all the methods of a string python object and it can be used as such.

Additionally it provides the following methods:

  • to_list()

  • to_dataframe()

BoundaryConditionsListingOutput.to_list()

Export the command output a list or list of lists.

BoundaryConditionsListingOutput.to_dataframe()

Convert the command output to a Pandas Dataframe.