We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actual behavior: user has to do
cable_data = pd.DataFrame( { "section": [345.55], "diameter": [22.4], "linear_weight": [9.55494], "young_modulus": [59], "dilatation_coefficient": [23], "temperature_reference": [0], } ) cable_array = CableArray(cable_data.loc[cable_data.index.repeat(4)].reset_index(drop=True)) cable_array.data #------ section diameter linear_weight young_modulus dilatation_coefficient temperature_reference 0 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 1 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 2 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 3 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0
in order to have 4 identical cable for a section.
The idea is to add a .repeat method. This method can be used by the user in this way:
cable_array.repeat(n=4) #------ section diameter linear_weight young_modulus dilatation_coefficient temperature_reference 0 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 1 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 2 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0 3 0.000346 0.0224 9.55494 5.900000e+10 0.000023 0.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Actual behavior: user has to do
in order to have 4 identical cable for a section.
The idea is to add a .repeat method. This method can be used by the user in this way:
The text was updated successfully, but these errors were encountered: