class_docstr: An object designed to perform optimisations based on minimising a cost/objective function.
  It can find parameters for portfolios with
  
  - minimum volatility
  - maximum Sharpe ratio
  - minimum volatility for a given target return
  - maximum Sharpe ratio for a given target volatility
  
  It also provides functions to compute the Efficient Frontier between a range
  of Returns, plot the Efficient Frontier, plot the optimal portfolios
  (minimum Volatility and maximum Sharpe Ratio).
class_docstr_tok: ["An","object","designed","to","perform","optimisations","based","on","minimising","a","cost\/objective","function",".","It","can","find","parameters","for","portfolios","with","-","minimum","volatility","-","maximum","Sharpe","ratio","-","minimum","volatility","for","a","given","target","return","-","maximum","Sharpe","ratio","for","a","given","target","volatility","It","also","provides","functions","to","compute","the","Efficient","Frontier","between","a","range","of","Returns",",","plot","the","Efficient","Frontier",",","plot","the","optimal","portfolios","(","minimum","Volatility","and","maximum","Sharpe","Ratio",")","."]
docstr: Generates and returns a DataFrame from given array weights.
  
  :param weights: An array of weights of the stock of the portfolio.
  
  :return: A DataFrame with the weights/allocation of stocks
docstr_tok: ["Generates","and","returns","a","DataFrame","from","given","array","weights",".",":","param","weights",":","An","array","of","weights","of","the","stock","of","the","portfolio",".",":","return",":","A","DataFrame","with","the","weights\/allocation","of","stocks"]
code: def _dataframe_weights(
      self, weights: Optional[np.ndarray[np.float64, Any]]
  ) -> pd.DataFrame:
      """Generates and returns a DataFrame from given array weights.
  
      :param weights: An array of weights of the stock of the portfolio.
  
      :return: A DataFrame with the weights/allocation of stocks
      """
      # Type validations:
      type_validation(weights_array=weights)
      return pd.DataFrame(
          weights, index=self.names, columns=["Allocation"]
      ).astype(np.float64)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import matplotlib.pylab
  import numpy
  import pandas
  import scipy.optimize
  import finquant.minimise_fun
  from finquant.data_types import ARRAY_OR_DATAFRAME, ARRAY_OR_LIST, FLOAT, INT, NUMERIC
  from finquant.quants import annualised_portfolio_quantities
  from finquant.type_utilities import type_validation
label_desc: Use image node_id 9 for calling the EfficientFrontier obj's underlying member method code with example usage: obj._dataframe_weights(weights) and returns: pd